From 020d864abc1a6536ce227bad162d0e6a2da14fe5 Mon Sep 17 00:00:00 2001 From: Hayden Spitzley Date: Tue, 31 Oct 2023 10:55:11 -0400 Subject: [PATCH] consistent error schema --- api/pkg/api/app_ent.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/pkg/api/app_ent.go b/api/pkg/api/app_ent.go index ee4999f776..2aa8bd3fd6 100644 --- a/api/pkg/api/app_ent.go +++ b/api/pkg/api/app_ent.go @@ -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()