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