Documentation
¶
Index ¶
Constants ¶
View Source
const ( SUCCESS = 1000 FAILURE = 1001 InternalError = 1002 )
SUCCESS The program met expectations and was successfully processed FAILURE Exception status code captured within the service InternalError Service internal exception, not caught, fatal error code
View Source
const ( PRINT_ERROR_STACK = false OUTPUT_INTERNAL_ERROR = true ADD_LINK_TRACKING_MIDDLEWARE = true ADD_REQUEST_LOGGING_MIDDLEWARE = true )
PRINT_ERROR_STACK The exception thrown in the program will print the error stack OUTPUT_INTERNAL_ERROR Uncaptured service internal exception will be returned in the response ADD_LINK_TRACKING_MIDDLEWARE Add request headers middleware ADD_REQUEST_LOGGING_MIDDLEWARE Add request logging middleware
Variables ¶
View Source
var ExceptionsToCatch = []Exception{ &NoPermissions{}, &DatabaseFailure{}, }
Functions ¶
Types ¶
type DatabaseFailure ¶
type DatabaseFailure struct {
Message string
}
func (*DatabaseFailure) Error ¶
func (e *DatabaseFailure) Error() string
type NoPermissions ¶
type NoPermissions struct {
Message string
}
type UnsupportedDataTypeError ¶
type UnsupportedDataTypeError struct {
Message string
}
func (*UnsupportedDataTypeError) Error ¶
func (e *UnsupportedDataTypeError) Error() string
Click to show internal directories.
Click to hide internal directories.