Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 33b9a1a

Browse files
Ramon NogueiraBogdan Drutu
authored andcommitted
Define the mapping from HTTP to status code (#108)
1 parent 243df8f commit 33b9a1a

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

trace/HTTP.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,25 @@ status code.
4949
Don't set the status message if the reason can be inferred at the callsite of from the HTTP
5050
status code.
5151

52+
### Mapping from HTTP status codes to Trace status codes
53+
54+
| HTTP code | Trace status code |
55+
|-----------------------|------------------------|
56+
| 0...199 | 2 Unknown |
57+
| 200...399 | 0 (OK) |
58+
| 400 Bad Request | 3 (INVALID_ARGUMENT) |
59+
| 504 Gateway Timeout | 4 (DEADLINE_EXCEEDED) |
60+
| 404 Not Found | 5 (NOT_FOUND) |
61+
| 403 Forbidden | 7 (PERMISSION_DENIED) |
62+
| 401 Unauthorized* | 16 (UNAUTHENTICATED) |
63+
| 429 Too Many Requests | 8 (RESOURCE_EXHAUSTED) |
64+
| 501 Not Implemented | 12 (UNIMPLEMENTED) |
65+
| 503 Unavailable | 14 (UNAVAILABLE) |
66+
67+
Notes: 401 Unauthorized actually means unauthenticated according to RFC 7235, 3.1.
68+
69+
The Status message should be the Reason-Phrase (RFC 2616 6.1.1) from the response status line (if available).
70+
5271
## Message events
5372

5473
In the lifetime of an incoming and outgoing request, the following message events SHOULD be created:

0 commit comments

Comments
 (0)