Skip to content

Commit d34d3d8

Browse files
committed
comment + changeset
1 parent 157f212 commit d34d3d8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/rich-places-move.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"github.com/livekit/protocol": patch
3+
---
4+
5+
Adding more SIP return codes and updating SIP-to-Twirp return code mapping

livekit/sip.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func (p *SIPStatus) GRPCStatus() *status.Status {
134134
} else if code < 500 {
135135
code = codes.InvalidArgument
136136
} else if code < 600 {
137-
code = codes.Internal
137+
code = codes.FailedPrecondition // 5xx from remote server, per guideline (c) in gRPC docs
138138
} else if code < 700 {
139139
code = codes.InvalidArgument // Same as 4xx ,but authoratative
140140
}

0 commit comments

Comments
 (0)