question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Transaction.Response.StatusCode is expected to be Number not String

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
beniwohlicommented, Sep 13, 2017

I don’t think this was an exception, but a transaction, and during sending of the transaction, an error happened.

0reactions
beniwohlicommented, Sep 13, 2017

Opened a PR. Ideally, we should have tests that run this stuff against the JSON Schema. I’ll look into doing that.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found