Updated PreconditionFailed status occurences to more appropriate statuses. (#5513)

This commit is contained in:
Ben A
2023-01-13 14:30:48 +00:00
committed by GitHub
parent 967d25fdf7
commit 54cc587dad
15 changed files with 37 additions and 37 deletions

View File

@ -50,7 +50,7 @@ func ExtractOAuth2(config OAuth2Config, client *http.Client) func(http.Handler)
// Interfaces can hold a nil value
if config == nil || reflect.ValueOf(config).IsNil() {
httpapi.Write(ctx, rw, http.StatusPreconditionRequired, codersdk.Response{
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
Message: "The oauth2 method requested is not configured!",
})
return