Skip to content

Commit

Permalink
Merge pull request #3330 from kishieel/master
Browse files Browse the repository at this point in the history
feat(apollo): map unprocessable entity code to bad user input
  • Loading branch information
kamilmysliwiec authored Oct 23, 2024
2 parents 4a922f1 + 5bf3fee commit 708fbc6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/apollo/lib/drivers/apollo-base.driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { createAsyncIterator } from '../utils/async-iterator.util';

const apolloPredefinedExceptions: Partial<Record<HttpStatus, string>> = {
[HttpStatus.BAD_REQUEST]: ApolloServerErrorCode.BAD_REQUEST,
[HttpStatus.UNPROCESSABLE_ENTITY]: ApolloServerErrorCode.BAD_USER_INPUT,
[HttpStatus.UNAUTHORIZED]: 'UNAUTHENTICATED',
[HttpStatus.FORBIDDEN]: 'FORBIDDEN',
};
Expand Down

0 comments on commit 708fbc6

Please sign in to comment.