diff options
| author | Shulhan <ms@kilabit.info> | 2024-01-23 23:44:48 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-01-24 00:07:18 +0700 |
| commit | 0313d9223c920c58107c9092a0dc66ebf88fefdf (patch) | |
| tree | 5e8b83144ffc7cccd06be20c11b2a516f654f015 /lib/http/callback_error_handler.go | |
| parent | eb2b4dbdeceb663b1ce29bc08cd5446ecf4c1f07 (diff) | |
| download | pakakeh.go-0313d9223c920c58107c9092a0dc66ebf88fefdf.tar.xz | |
lib/http: update doc to use comment links
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) { |
