Skip to content

Commit

Permalink
Added response context (#1028)
Browse files Browse the repository at this point in the history
For normalizing where we store the HTTP response code in our events we invented the response context: getsentry/team-sdks#9

This PR adds documentation on how this response context should look like.
  • Loading branch information
antonpirker authored Aug 29, 2023
1 parent 3ce43a7 commit 6342100
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions develop-docs/sdk/event-payloads/contexts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -732,3 +732,30 @@ envelope endpoint.
}
}
```


## Response Context

Response context contains information about the HTTP response associated with the event.

The only and required field is `status_code`.

This is mostly set on transactions in a web server environment where one transaction represents a HTTP request/response cycle.

`status_code`

: **Required.** The integer status code from the HTTP response associated with the event.
- Example: `200`


### Example Response Context

```json
{
"contexts": {
"response": {
"status_code": 404
}
}
}
```

0 comments on commit 6342100

Please sign in to comment.