Skip to content

Commit

Permalink
map APIError to Bad Request
Browse files Browse the repository at this point in the history
  • Loading branch information
sauntimo committed Sep 17, 2024
1 parent a72ee74 commit ed05471
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default async () => {
request.response.output.statusCode = statusCode;
request.response.output.payload = {
statusCode: statusCode,
error: request.response.name,
error: request.response.name === "APIError" ? "Bad Request" : request.response.name,
message: request.response.message
};
}
Expand Down

0 comments on commit ed05471

Please sign in to comment.