diff --git a/app/controllers/objects_controller.rb b/app/controllers/objects_controller.rb index 437ad59d5..1cf1e9c02 100644 --- a/app/controllers/objects_controller.rb +++ b/app/controllers/objects_controller.rb @@ -27,7 +27,7 @@ def create Honeybadger.notify(e) json_api_error(status: :bad_gateway, title: 'Catalog connection error', message: 'Unable to read descriptive metadata from the catalog') rescue Catalog::MarcService::CatalogRecordNotFoundError => e - json_api_error(status: :bad_request, title: 'Catkey not found in Symphony', message: e.message) + json_api_error(status: :bad_request, title: 'Record not found in catalog', message: e.message) rescue Catalog::MarcService::MarcServiceError => e Honeybadger.notify(e) json_api_error(status: :internal_server_error, message: e.message) diff --git a/spec/requests/create_object_spec.rb b/spec/requests/create_object_spec.rb index 1e544ebd3..7cf963586 100644 --- a/spec/requests/create_object_spec.rb +++ b/spec/requests/create_object_spec.rb @@ -171,7 +171,7 @@ post '/v1/objects', params: data, headers: { 'Authorization' => "Bearer #{jwt}", 'Content-Type' => 'application/json' } - expect(response.body).to eq '{"errors":[{"status":"400","title":"Catkey not found in Symphony",' \ + expect(response.body).to eq '{"errors":[{"status":"400","title":"Record not found in catalog",' \ '"detail":"unable to find catkey"}]}' expect(response).to have_http_status :bad_request end