Skip to content
This repository was archived by the owner on Jun 2, 2021. It is now read-only.

Commit 7a8d9fd

Browse files
reidmitmonamohebbi
andcommitted
V3: More luxurious error when UAA is unavailable during a POST
v3/domains with a router group [finishes #162395328] Co-authored-by: Reid Mitchell <rmitchell@pivotal.io> Co-authored-by: Mona Mohebbi <mmohebbi@pivotal.io>
1 parent 74ef123 commit 7a8d9fd

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app/controllers/v3/domains_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def fetch_router_group(router_group_guid)
218218
routing_client.router_group(router_group_guid)
219219
rescue RoutingApi::RoutingApiUnavailable
220220
service_unavailable!('The Routing API is currently unavailable. Please try again later.')
221-
rescue RoutingApi::UaaUnavailable
221+
rescue UaaUnavailable, RoutingApi::UaaUnavailable
222222
service_unavailable!('Communicating with the Routing API failed because UAA is currently unavailable. Please try again later.')
223223
end
224224
end

spec/request/domains_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@
830830
let(:user_header) { admin_headers_for(user) }
831831

832832
before do
833-
allow(routing_api_client).to receive(:router_group).and_raise VCAP::CloudController::RoutingApi::UaaUnavailable
833+
allow(routing_api_client).to receive(:router_group).and_raise VCAP::CloudController::UaaUnavailable
834834
end
835835

836836
it 'returns a 503 with a helpful message' do

0 commit comments

Comments
 (0)