Browse Source

add error codes

master
AJ ONeal 5 months ago
parent
commit
c36c0200f3
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      mockid/route.go

+ 2
- 0
mockid/route.go View File

@ -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

Loading…
Cancel
Save