servererror

package
v2.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerError

type ServerError struct {
	Details    *string  `json:"details,omitempty"`
	Links      []string `json:"links"`
	Type       string   `json:"type"`
	Validation *[]struct {
		Field   string `json:"field"`
		Message string `json:"message"`
	}
	Data *map[string]any

	HTTPStatusCode int32              `json:"httpStatusCode"`
	Message        string             `json:"message"`
	RequestData    common.RequestData `json:"requestData"`
	Runtime        float32            `json:"runtime"`
}

func New

func New(cause *common.ErrorRsp) *ServerError

New wraps an error response into a ServerError

func (*ServerError) Error

func (s *ServerError) Error() string

Error implements error interface

func (*ServerError) GetValidationMessage

func (s *ServerError) GetValidationMessage() string

GetValidationMessage returns all validation messages as one string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL