Skip to content

Commit

Permalink
chore: make serialization error wrappable
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Nov 25, 2024
1 parent eab241e commit b6468e6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ import (
var (
// ErrInvalidatedAuthorizeCode is an error indicating that an authorization code has been
// used previously.
ErrInvalidatedAuthorizeCode = errors.New("Authorization code has ben invalidated")
ErrInvalidatedAuthorizeCode = stderr.New("Authorization code has ben invalidated")
// ErrSerializationFailure is an error indicating that the transactional capable storage could not guarantee
// consistency of Update & Delete operations on the same rows between multiple sessions.
ErrSerializationFailure = errors.New("The request could not be completed due to concurrent access")
ErrUnknownRequest = &RFC6749Error{
ErrSerializationFailure = &RFC6749Error{
ErrorField: errUnknownErrorName,
DescriptionField: "The request could not be completed because another request is competing for the same resource.",
CodeField: http.StatusConflict,
}
ErrUnknownRequest = &RFC6749Error{
ErrorField: errUnknownErrorName,
DescriptionField: "The handler is not responsible for this request.",
CodeField: http.StatusBadRequest,
Expand Down

0 comments on commit b6468e6

Please sign in to comment.