Skip to content

Commit

Permalink
fix: return error response to avoid hanging
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Bravo <jose.bravo@nearform.com>
  • Loading branch information
ja-bravo committed Sep 13, 2024
1 parent 855d4ab commit 4636a55
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,15 @@ export function verifyTokenRequest(options: { preAuthorizedCodeExpirationInSecon
}
} catch (error) {
if (error instanceof TokenError) {
sendErrorResponse(
return sendErrorResponse(
response,
agentContext.config.logger,
error.statusCode,
error.responseError,
error.getDescription()
)
} else {
sendErrorResponse(response, agentContext.config.logger, 400, TokenErrorResponse.invalid_request, error)
return sendErrorResponse(response, agentContext.config.logger, 400, TokenErrorResponse.invalid_request, error)
}
}

Expand Down

0 comments on commit 4636a55

Please sign in to comment.