Skip to content

Commit

Permalink
chore: Extend the ProtoMsg.Error schema with a status field
Browse files Browse the repository at this point in the history
The status hint code is a necessary hint for the server to determine
what status to return.

Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
  • Loading branch information
alfrunes committed Dec 1, 2023
1 parent 9e088ac commit 0b62e2d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ws/protomsg.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ type Error struct {
Error string `msgpack:"err" json:"error"`
// Close determines whether the session closed as a result of this error.
Close bool `msgpack:"close" json:"close"`
// Status is an upstream status hint of the equivalent HTTP status code.
Status int `msgpack:"status,omitempty" json:"status,omitempty"`
// MessageProto is the protocol of the message that caused the error.
MessageProto ProtoType `msgpack:"msgproto,omitempty" json:"message_protocol,omitempty"`
// Type of message that raised the error
Expand Down

0 comments on commit 0b62e2d

Please sign in to comment.