diff --git a/cmd/service/service.go b/cmd/service/service.go index 910099c..d73c5cf 100644 --- a/cmd/service/service.go +++ b/cmd/service/service.go @@ -52,7 +52,7 @@ func (s *querySvcsrvc) QueryResources(ctx context.Context, p *querysvc.QueryReso criteria, errCriteria := s.payloadToCriteria(ctx, p) if errCriteria != nil { slog.ErrorContext(ctx, "failed to convert payload to criteria", "error", errCriteria) - return nil, wrapError(ctx, errCriteria) + return nil, errCriteria } // Execute search using the service layer diff --git a/cmd/service/service_test.go b/cmd/service/service_test.go index 04cca41..c3be12b 100644 --- a/cmd/service/service_test.go +++ b/cmd/service/service_test.go @@ -136,7 +136,7 @@ func TestQuerySvcsrvc_QueryResources(t *testing.T) { // No setup needed as we expect error during token parsing }, expectedError: true, - expectedErrorType: &querysvc.InternalServerError{}, // Changed to match actual behavior + expectedErrorType: &querysvc.BadRequestError{}, }, }