NewAuthenticationError creates a new authentication error with a cause based on a base error.
(baseErr *AuthenticationError, cause error)
| 104 | |
| 105 | // NewAuthenticationError creates a new authentication error with a cause based on a base error. |
| 106 | func NewAuthenticationError(baseErr *AuthenticationError, cause error) *AuthenticationError { |
| 107 | return &AuthenticationError{ |
| 108 | Type: baseErr.Type, |
| 109 | Message: baseErr.Message, |
| 110 | Code: baseErr.Code, |
| 111 | Cause: cause, |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | // IsAuthenticationError checks if an error is an authentication error. |
| 116 | func IsAuthenticationError(err error) bool { |
no outgoing calls
no test coverage detected