Transaction.Response.StatusCode is expected to be Number not String
See original GitHub issueI experienced an error
being sent to the transactions
endpoint. It clearly happened in a development scenario, when I applied a change in a running Django app. Feel free to disregard this ‘bug’ report if it cannot happen in a ‘real-world-scenario’.
Django console logging:
HTTP 400:
Failed to submit message: '<no message value>'
Traceback (most recent call last):
File "/Users/simitt/.pyenv/versions/django-test-3.6.2/lib/python3.6/site-packages/elasticapm/transport/http_urllib3.py", line 75, in send_sync
url = Urllib3Transport.send(self, data, headers)
File "/Users/simitt/.pyenv/versions/django-test-3.6.2/lib/python3.6/site-packages/elasticapm/transport/http_urllib3.py", line 61, in send
raise TransportException(message, data, print_trace=print_trace)
elasticapm.transport.base.TransportException: HTTP 400:
APM Server logging:
I[#/transactions/0/context/response/status_code] S[#/properties/transactions/items/properties/context/properties/response/properties/status_code/type] expected number or null, but got string, code=400
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
402 Payment Required - HTTP - MDN Web Docs
Sometimes, this status code indicates that the request cannot be processed until the client makes a payment. However, no standard use convention ...
Read more >node.js - nodejs - first argument must be a string or Buffer - ...
statusCode is a number, e.g. response.statusCode === 200 , not '200' . As the error message says, write expects a string or Buffer ......
Read more >Status codes in HTTP
The request has been accepted for processing, but the processing has not been completed. The request may or may not eventually be acted...
Read more >A Complete Guide and List of HTTP Status Codes
A complete list of HTTP status codes with explaination of what they are, why they occur and what you can do to fix...
Read more >Gateway Error Codes | Mastercard Developers Platform
If the request content type does not match any of the defined supported content types, an error message is returned. HTTP status code....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t think this was an exception, but a transaction, and during sending of the transaction, an error happened.
Opened a PR. Ideally, we should have tests that run this stuff against the JSON Schema. I’ll look into doing that.