Skip to content

Commit 560bb60

Browse files
committed
Note about responses
1 parent 31354f8 commit 560bb60

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

docs/developer/client/index.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,43 @@ The request body should then somewhat resemble the following::
416416
}]
417417
}
418418

419+
Reading the Response
420+
--------------------
421+
422+
If you're using HTTP, you'll receive a response from the server. The response
423+
looks something like this:
424+
425+
::
426+
427+
HTTP/1.1 200 OK
428+
Content-Type: application/json
429+
430+
{
431+
"id": "fc6d8c0c43fc4630ad850ee518f1b9d0"
432+
}
433+
434+
One thing to take note of is the response status code. Sentry uses this in a
435+
variety of ways. You'll **always** want to check for a 200 response if you want
436+
to ensure that the message was delivered, as a small level of validation
437+
happens immediately that may result in a different response code (and message).
438+
439+
For example, you might get something like this:
440+
441+
::
442+
443+
444+
HTTP/1.1 400 Bad Request
445+
X-Sentry-Error: Client request error: Missing client version identifier
446+
447+
Client request error: Missing client version identifier
448+
449+
450+
.. note:: The X-Sentry-Error header will always be present with the precise
451+
error message and it is the preferred way to identify the root cause.
452+
453+
If it's not available, it's likely the request was not handled by the
454+
API server, or a critical system failure has occurred.
455+
419456
Handling Failures
420457
-----------------
421458

0 commit comments

Comments
 (0)