fix: update error handling
This commit is contained in:
parent
f34f009f17
commit
accffade40
|
@ -264,19 +264,19 @@ func (h *HttpHandler) AccountRegister(jc jape.Context) {
|
||||||
decodedResponse, err := base64.RawURLEncoding.DecodeString(request.Response)
|
decodedResponse, err := base64.RawURLEncoding.DecodeString(request.Response)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errored(err)
|
errored(errInvalidChallengeErr)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(decodedResponse) != 65 {
|
if len(decodedResponse) != 65 {
|
||||||
errored(err)
|
errored(errInvalidChallengeErr)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
decodedChallenge, err := base64.RawURLEncoding.DecodeString(challenge.Challenge)
|
decodedChallenge, err := base64.RawURLEncoding.DecodeString(challenge.Challenge)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errored(err)
|
errored(errInvalidChallengeErr)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue