Skip to content

Commit

Permalink
Omit ex-data when empty
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Dec 31, 2020
1 parent 0f5e1de commit 3fd45e4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions babashka/ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type ErrorResponse struct {
Id string "id"
Status []string "status"
ExMessage string "ex-message"
ExData string "ex-data"
ExData string "ex-data,omitempty"
}

func ReadMessage() (*Message, error) {
Expand Down Expand Up @@ -72,7 +72,6 @@ func WriteErrorResponse(inputMessage *Message, err error) {
Id: inputMessage.Id,
Status: []string{"done", "error"},
ExMessage: errorMessage,
ExData: "{}",
}
writeResponse(errorResponse)
}
Expand Down

0 comments on commit 3fd45e4

Please sign in to comment.