From c36c0200f317bb700c85d92f1149a8486fce9769 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 17 Sep 2020 07:59:38 +0000 Subject: [PATCH] add error codes --- mockid/route.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mockid/route.go b/mockid/route.go index 5c7536e..86204f4 100644 --- a/mockid/route.go +++ b/mockid/route.go @@ -153,6 +153,7 @@ func Route(jwksPrefix string, privkey keypairs.PrivateKey) http.Handler { http.Error(w, "Bad Request", http.StatusBadRequest) b, _ := json.Marshal(&HTTPResponse{ Error: "missing require query parameter 'contact'", + Code: "E_USER", }) w.Write(b) return @@ -253,6 +254,7 @@ func Route(jwksPrefix string, privkey keypairs.PrivateKey) http.Handler { if errTokenNotVerified == err { b, _ := json.Marshal(&HTTPResponse{ Error: err.Error(), + Code: "E_RETRY", }) w.Write(b) return