Skip to content

Commit 0a8001d

Browse files
committed
fix: correct error code
This error path shouldn't be happening very often, but we should still correct the error code used.
1 parent 9b5d19d commit 0a8001d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oapi_validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func performRequestValidationForErrorHandlerWithOpts(next http.Handler, w http.R
211211
// we don't want to crash the server, so handle the unexpected error.
212212
// return http.StatusInternalServerError,
213213
theErr = fmt.Errorf("error validating route: %w", e)
214-
errOpts.StatusCode = http.StatusUnauthorized
214+
errOpts.StatusCode = http.StatusInternalServerError
215215
}
216216

217217
options.ErrorHandlerWithOpts(r.Context(), theErr, w, r, errOpts)

0 commit comments

Comments
 (0)