NewNotFoundError creates and returns 404 ApiError.
(message string, rawErrData any)
| 65 | |
| 66 | // NewNotFoundError creates and returns 404 ApiError. |
| 67 | func NewNotFoundError(message string, rawErrData any) *ApiError { |
| 68 | if message == "" { |
| 69 | message = "The requested resource wasn't found." |
| 70 | } |
| 71 | |
| 72 | return NewApiError(http.StatusNotFound, message, rawErrData) |
| 73 | } |
| 74 | |
| 75 | // NewBadRequestError creates and returns 400 ApiError. |
| 76 | func NewBadRequestError(message string, rawErrData any) *ApiError { |
searching dependent graphs…