Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Failed API calls raise `LiveKit::ServerError`, which exposes the error `code`, m
begin
api.sip.create_sip_participant('trunk-id', '+15105550100', 'my-room', wait_until_answered: true)
rescue LiveKit::SipCallError => e
puts e # e.g. "SIP call failed: 486 Busy Here (resource_exhausted)"
puts e # e.g. "SIP call failed: 486 Busy Here (failed_precondition)"
puts e.sip_status_code # 486
rescue LiveKit::ServerError => e
puts e.code
Expand Down
2 changes: 1 addition & 1 deletion spec/api/livekit_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def sip_error(sip, wait: false)
it 'surfaces a busy signal as SipCallError' do
e = sip_error({ 'code' => 486, 'status' => 'Busy Here' })
expect(e).to be_a(LiveKit::ServerError)
expect(e.code).to eq('resource_exhausted')
expect(e.code).to eq('failed_precondition')
expect(e.sip_status_code).to eq(486)
expect(e.sip_status).to eq('Busy Here')
expect(e.to_s).to include('486').and include('Busy Here')
Expand Down
Loading