Skip to content

Commit

Permalink
consistent error schema
Browse files Browse the repository at this point in the history
  • Loading branch information
hspitzley-czi committed Oct 31, 2023
1 parent 2b6836a commit 020d864
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/pkg/api/app_ent.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ func MakeOgentServer(ctx context.Context, cfg *setup.Configuration) (*ogent.Serv

e := jx.GetEncoder()
e.ObjStart()
e.FieldStart("message")
e.FieldStart("code")
e.Int(code)
e.FieldStart("errors")
e.StrEscape(err.Error())
e.ObjEnd()

Expand Down

0 comments on commit 020d864

Please sign in to comment.