Skip to content

Commit 0747995

Browse files
committed
docs: Add more clarification to req/request object
1 parent 31e58d3 commit 0747995

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/usage.rst

+5-4
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,11 @@ All optional attributes are passed as part of the options to ``captureException`
136136
137137
If you're inside a context and your context data includes a ``user`` key, that data will be merged into this.
138138

139-
.. describe:: req
139+
.. describe:: request
140140

141-
The ``req`` object associated with this event, from a Node http server, Express, Koa, or similar.
142-
Will be parsed for request details and user context from ``req.user`` if present.
141+
Alias: ``req``. The ``request`` object associated with this event, from a Node http server, Express, Koa, or similar.
142+
Will be parsed for request details and user context from ``request.user`` if present. It will only pull out the data
143+
that's handled by the server: ``headers``, ``method``, ``host``, ``protocol``, ``url``, ``query``, ``cookies``, ``body``, ``ip`` and ``user``.
143144

144145
.. code-block:: javascript
145146
@@ -299,7 +300,7 @@ It can do anything necessary, including asynchronous operations, to make a best
299300
not throw, and it absolutely must not allow the process to keep running indefinitely. This means it should probably make an explicit ``process.exit()`` call.
300301

301302
After catching a fatal exception, Raven will make a best-effort attempt to send it to Sentry before it calls the fatal exception handler.
302-
If sending fails, a ``sendErr`` error object will be passed, and otherwise the ``eventId`` will be provided. In either case, the error object
303+
If sending fails, a ``sendErr`` error object will be passed, and otherwise the ``eventId`` will be provided. In either case, the error object
303304
resulting in the shutdown is passed as the first parameter.
304305

305306
.. code-block:: javascript

0 commit comments

Comments
 (0)