NewSentinelHttpError creates a [SentinelHttpError]. The message will be sent as the response's body if returned from a handler, so make sure to not leak sensible information.
(status int, message string)
| 17 | // as the response's body if returned from a handler, so make sure to not leak |
| 18 | // sensible information. |
| 19 | func NewSentinelHttpError(status int, message string) SentinelHttpError { |
| 20 | return SentinelHttpError{ |
| 21 | status: status, |
| 22 | message: message, |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | // Error returns the message. |
| 27 | func (err SentinelHttpError) Error() string { |
no outgoing calls