Skip to content

Commit

Permalink
Don't put error message directly to a webpage.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gandalf-the-Grey committed May 4, 2024
1 parent 100394a commit 36ac519
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/api/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export default function useGeneralApi(app) {
ctx.status = 200;
} catch (error) {
console.error('Error in /search api call', ctx.session.uid, error);
ctx.body = JSON.stringify({ error: error.message });
ctx.body = JSON.stringify({ error: "An unexpected error occurred. Please try again later." });
ctx.status = 500;
}
});
Expand Down

0 comments on commit 36ac519

Please sign in to comment.