File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 2525 ErrInvalidatedAuthorizeCode = stderr .New ("Authorization code has ben invalidated" )
2626 // ErrSerializationFailure is an error indicating that the transactional capable storage could not guarantee
2727 // consistency of Update & Delete operations on the same rows between multiple sessions.
28- ErrSerializationFailure = stderr .New ("The request could not be completed due to concurrent access" )
29- ErrUnknownRequest = & RFC6749Error {
28+ ErrSerializationFailure = & RFC6749Error {
29+ ErrorField : errUnknownErrorName ,
30+ DescriptionField : "The request could not be completed because another request is competing for the same resource." ,
31+ CodeField : http .StatusConflict ,
32+ }
33+ ErrUnknownRequest = & RFC6749Error {
3034 ErrorField : errUnknownErrorName ,
3135 DescriptionField : "The handler is not responsible for this request." ,
3236 CodeField : http .StatusBadRequest ,
Original file line number Diff line number Diff line change @@ -221,12 +221,14 @@ func (c *RefreshTokenGrantHandler) handleRefreshTokenEndpointStorageError(ctx co
221221 if errors .Is (storageErr , fosite .ErrSerializationFailure ) {
222222 return errorsx .WithStack (fosite .ErrInvalidRequest .
223223 WithDebugf (storageErr .Error ()).
224+ WithWrap (storageErr ).
224225 WithHint ("Failed to refresh token because of multiple concurrent requests using the same token which is not allowed." ))
225226 }
226227
227228 if errors .Is (storageErr , fosite .ErrNotFound ) || errors .Is (storageErr , fosite .ErrInactiveToken ) {
228229 return errorsx .WithStack (fosite .ErrInvalidRequest .
229230 WithDebugf (storageErr .Error ()).
231+ WithWrap (storageErr ).
230232 WithHint ("Failed to refresh token because of multiple concurrent requests using the same token which is not allowed." ))
231233 }
232234
You can’t perform that action at this time.
0 commit comments