Skip to content

Commit

Permalink
legacyprovision: fix RespError json serialization (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
rnons authored Feb 11, 2025
1 parent a0f577b commit 0fffc12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/mautrix-meta/legacyprovision.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func legacyProvLogin(w http.ResponseWriter, r *http.Request) {
zerolog.Ctx(ctx).Err(err).Msg("Failed to log in")
var respErr bridgev2.RespError
if errors.As(err, &respErr) {
jsonResponse(w, respErr.StatusCode, &respErr)
respErr.Write(w)
} else {
jsonResponse(w, http.StatusInternalServerError, Error{ErrCode: "M_UNKNOWN", Error: "Internal error logging in"})
}
Expand Down

0 comments on commit 0fffc12

Please sign in to comment.