feat(server): add invalid oauth callback code error handling (#10603)

close CLOUD-130
This commit is contained in:
fengmk2
2025-03-05 06:16:59 +00:00
parent 0b8fa7904d
commit b88113a2d1
6 changed files with 57 additions and 12 deletions

View File

@@ -301,6 +301,12 @@ export const USER_FRIENDLY_ERRORS = {
type: 'bad_request',
message: 'Invalid callback state parameter.',
},
invalid_oauth_callback_code: {
type: 'bad_request',
args: { status: 'number', body: 'string' },
message: ({ status, body }) =>
`Invalid callback code parameter, provider response status: ${status} and body: ${body}.`,
},
missing_oauth_query_parameter: {
type: 'bad_request',
args: { name: 'string' },