NewForbiddenError creates and returns 403 ApiError.
(message string, rawErrData any)
| 83 | |
| 84 | // NewForbiddenError creates and returns 403 ApiError. |
| 85 | func NewForbiddenError(message string, rawErrData any) *ApiError { |
| 86 | if message == "" { |
| 87 | message = "You are not allowed to perform this request." |
| 88 | } |
| 89 | |
| 90 | return NewApiError(http.StatusForbidden, message, rawErrData) |
| 91 | } |
| 92 | |
| 93 | // NewUnauthorizedError creates and returns 401 ApiError. |
| 94 | func NewUnauthorizedError(message string, rawErrData any) *ApiError { |
searching dependent graphs…