diff options
Diffstat (limited to 'lib/http/callback_error_handler.go')
| -rw-r--r-- | lib/http/callback_error_handler.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/http/callback_error_handler.go b/lib/http/callback_error_handler.go index 5b93a7b5..548b2566 100644 --- a/lib/http/callback_error_handler.go +++ b/lib/http/callback_error_handler.go @@ -14,20 +14,20 @@ import ( ) // CallbackErrorHandler define the function that can be used to handle an -// error returned from Endpoint.Call. -// By default, if Endpoint.Call is nil, it will use DefaultErrorHandler. +// error returned from [Endpoint.Call]. +// By default, if [Endpoint.Call] is nil, it will use [DefaultErrorHandler]. type CallbackErrorHandler func(epr *EndpointRequest) -// DefaultErrorHandler define the default function that will called to handle -// the error returned from Callback function, if the Endpoint.ErrorHandler is -// not defined. +// DefaultErrorHandler define the default function that will called to +// handle the error returned from [Callback] function, if the +// [Endpoint.ErrorHandler] is not defined. // -// First, it will check if error instance of *errors.E. If its true, it will -// use the Code value for HTTP status code, otherwise if its zero or invalid, -// it will set to http.StatusInternalServerError. +// First, it will check if error instance of *[liberrors.E]. +// If its true, it will use the Code value for HTTP status code, otherwise +// if its zero or invalid, it will set to [http.StatusInternalServerError]. // -// Second, it will set the HTTP header Content-Type to "application/json" and -// write the response body as JSON format, +// Second, it will set the HTTP header Content-Type to "application/json" +// and write the response body as JSON format, // // {"code":<HTTP_STATUS_CODE>, "message":<err.Error()>} func DefaultErrorHandler(epr *EndpointRequest) { |
