Commit db74aa7 1 parent 6335f90 commit db74aa7 Copy full SHA for db74aa7
File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 25
25
ErrInvalidatedAuthorizeCode = stderr .New ("Authorization code has ben invalidated" )
26
26
// ErrSerializationFailure is an error indicating that the transactional capable storage could not guarantee
27
27
// 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 {
30
34
ErrorField : errUnknownErrorName ,
31
35
DescriptionField : "The handler is not responsible for this request." ,
32
36
CodeField : http .StatusBadRequest ,
Original file line number Diff line number Diff line change @@ -221,12 +221,14 @@ func (c *RefreshTokenGrantHandler) handleRefreshTokenEndpointStorageError(ctx co
221
221
if errors .Is (storageErr , fosite .ErrSerializationFailure ) {
222
222
return errorsx .WithStack (fosite .ErrInvalidRequest .
223
223
WithDebugf (storageErr .Error ()).
224
+ WithWrap (storageErr ).
224
225
WithHint ("Failed to refresh token because of multiple concurrent requests using the same token which is not allowed." ))
225
226
}
226
227
227
228
if errors .Is (storageErr , fosite .ErrNotFound ) || errors .Is (storageErr , fosite .ErrInactiveToken ) {
228
229
return errorsx .WithStack (fosite .ErrInvalidRequest .
229
230
WithDebugf (storageErr .Error ()).
231
+ WithWrap (storageErr ).
230
232
WithHint ("Failed to refresh token because of multiple concurrent requests using the same token which is not allowed." ))
231
233
}
232
234
You can’t perform that action at this time.
0 commit comments