Giter Club home page Giter Club logo

Comments (3)

roncohen avatar roncohen commented on May 8, 2024 1

I agree that we should include more descriptive error messages. This will be particularly useful for signaling that the apm-server internal queue is full or that it can't contact the upstream Elasticsearch (or kafka) etc. These will be 5xx responses.

In the apm-server, we'd include the error JSON payload if the agent sent an Accept header that allows for it (*/* or application/json etc.) and just return a plain text error if not.

I like error instead of message:

{"error": "foo bar baz"}

When looking at the payload you might not see that the response code is not a 2xx (and as you wrote, curl by default doesn't display the status code), so the error key instead of the message key clearly indicates that there was a failure. I don't feel strongly about it though.

from apm-server.

roncohen avatar roncohen commented on May 8, 2024

@watson can we agree on the above?

from apm-server.

watson avatar watson commented on May 8, 2024

@roncohen sounds good to me 👍 And good point with using error instead of message.

What do you want to do with 404 and 405 responses? Should they have a body at all? If so, I imagine that body should follow the Accept header as well.

from apm-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.