Documentation ¶
Index ¶
- func ClientError(status int, message string) (events.APIGatewayProxyResponse, error)
- func DatabaseServerError(err error, msg string) (events.APIGatewayProxyResponse, error)
- func DatabaseServerErrorNew(err error, msg string) error
- func Error(err error, msg string, statusCode int) (events.APIGatewayProxyResponse, error)
- func ErrorFromDBError(err error) string
- func NewServerError(err error, msg string) error
- func ServerError(err error, msg string) (events.APIGatewayProxyResponse, error)
- func StatusCodeFromSQLError(err error) int
- type ServerErrorStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientError ¶
func ClientError(status int, message string) (events.APIGatewayProxyResponse, error)
ClientError creates responses due to request client error
func DatabaseServerError ¶
func DatabaseServerError(err error, msg string) (events.APIGatewayProxyResponse, error)
func DatabaseServerErrorNew ¶
func ErrorFromDBError ¶
func NewServerError ¶
func ServerError ¶
func ServerError(err error, msg string) (events.APIGatewayProxyResponse, error)
ServerError logs any error to os.Stderr and returns 500 Internal Server Error response that the AWS API Gateway understands.
func StatusCodeFromSQLError ¶
Types ¶
type ServerErrorStruct ¶
type ServerErrorStruct struct { Message string // contains filtered or unexported fields }
implements error so that API handler can extract the msg
Click to show internal directories.
Click to hide internal directories.