|
26 | 26 | context 'with invalid app part of the key' do |
27 | 27 | let(:invalid_key) { 'not_an_app.invalid_key_name:invalid_key_value' } |
28 | 28 |
|
29 | | - it 'enters the failed state and returns a not found error' do |
| 29 | + it 'enters the failed state and returns an invalid credentials error' do |
30 | 30 | connection.on(:failed) do |connection_state_change| |
31 | 31 | error = connection_state_change.reason |
32 | 32 | expect(connection.state).to eq(:failed) |
33 | 33 | # TODO: Check error type is an InvalidToken exception |
34 | | - expect(error.status).to eq(404) |
35 | | - expect(error.code).to eq(40400) # not found |
| 34 | + expect(error.status).to eq(401) |
| 35 | + expect(error.code).to eq(40101) # invalid credentials |
36 | 36 | stop_reactor |
37 | 37 | end |
38 | 38 | end |
|
46 | 46 | error = connection_state_change.reason |
47 | 47 | expect(connection.state).to eq(:failed) |
48 | 48 | # TODO: Check error type is a TokenNotFound exception |
49 | | - expect(error.status).to eq(401) |
| 49 | + expect(error.status).to eq(404) |
50 | 50 | expect(error.code).to eq(40400) # not found |
51 | 51 | stop_reactor |
52 | 52 | end |
@@ -1396,10 +1396,10 @@ def kill_connection_transport_and_prevent_valid_resume |
1396 | 1396 | channel = client.channels.get("foo") |
1397 | 1397 | channel.attach do |
1398 | 1398 | connection.once(:failed) do |state_change| |
1399 | | - expect(state_change.reason.code).to eql(40400) |
1400 | | - expect(connection.error_reason.code).to eql(40400) |
| 1399 | + expect(state_change.reason.code).to eql(40101) |
| 1400 | + expect(connection.error_reason.code).to eql(40101) |
1401 | 1401 | expect(channel).to be_failed |
1402 | | - expect(channel.error_reason.code).to eql(40400) |
| 1402 | + expect(channel.error_reason.code).to eql(40101) |
1403 | 1403 | stop_reactor |
1404 | 1404 | end |
1405 | 1405 |
|
|
0 commit comments