fix: update error handling

This commit is contained in:
Derrick Hammer 2024-01-16 15:26:57 -05:00
parent f34f009f17
commit accffade40
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 3 deletions

View File

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