Skip to content

Commit 37bccd1

Browse files
committed
internal server error
1 parent f81a3d1 commit 37bccd1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

broker/patron_request/api/api-handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ func (a *PatronRequestApiHandler) PutPatronRequestsId(w http.ResponseWriter, r *
547547
return
548548
}
549549
if a.illRepo == nil {
550-
api.AddBadRequestError(ctx, w, errors.New("illRepo is not configured"))
550+
api.AddInternalError(ctx, w, errors.New("illRepo is not configured"))
551551
return
552552
}
553553
_, err = a.illRepo.GetIllTransactionByRequesterRequestId(ctx, pgtype.Text{String: id, Valid: true})

broker/patron_request/api/api-handler_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,7 @@ func TestPutPatronRequestsIdIllRepoNotConfigured(t *testing.T) {
14981498
req, _ := http.NewRequest("PUT", "/", putBody(t, "3", validIllRequest()))
14991499
rr := httptest.NewRecorder()
15001500
handler.PutPatronRequestsId(rr, req, "3", proapi.PutPatronRequestsIdParams{})
1501-
assert.Equal(t, http.StatusBadRequest, rr.Code)
1501+
assert.Equal(t, http.StatusInternalServerError, rr.Code)
15021502
assert.Contains(t, rr.Body.String(), "illRepo is not configured")
15031503
}
15041504

0 commit comments

Comments
 (0)