Skip to content

Commit

Permalink
add error data to server error
Browse files Browse the repository at this point in the history
  • Loading branch information
corbadovych committed Dec 5, 2023
1 parent efc6462 commit 8212ec4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/sdk/servererror/servererror.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type ServerError struct {
Links []string `json:"links"`
Type string `json:"type"`
Validation *ValidationErrors
Data *map[string]any

HTTPStatusCode int32 `json:"httpStatusCode"`
Message string `json:"message"`
Expand All @@ -35,6 +36,7 @@ func New(cause *common.ErrorRsp) *ServerError {
Links: cause.Error.Links,
Type: cause.Error.Type,
Validation: cause.Error.Validation,
Data: cause.Data,

HTTPStatusCode: cause.HttpStatusCode,
Message: cause.Message,
Expand Down

0 comments on commit 8212ec4

Please sign in to comment.