Giter VIP home page Giter VIP logo

Comments (6)

eerison avatar eerison commented on June 3, 2024 2

just for my information, is there any branch, roadmap or milestone for slim 5?

from slim.

l0gicgate avatar l0gicgate commented on June 3, 2024 1

@eerison, there is not an official roadmap for Slim 5. I am just maintaining the many repos of the org and I have a full time job, unfortunately no time for this. If someone wants to step up and take the reigns, they are more than welcome to!

from slim.

l0gicgate avatar l0gicgate commented on June 3, 2024

I'm a bit confused by this, the error renderer's sole purpose is to render errors.

adding, removing or changing headers should be done within middleware or at the route callback level.

You can implement your own error middleware if needed to accomplish this.

from slim.

flavioheleno avatar flavioheleno commented on June 3, 2024

I agree that the usage of a ErrorRenderer is to purposefully render an error, but what I meant with this issue was a way to be capable of doing more than just doing the error redering, but I think you're right, I should probably deal with this in the middleware (or on a custom error handler).
The use case I had in mind was around rate-limiting, where I throw an exception that gets rendered by JsonErrorRenderer and lacks the rate-limiting headers.

from slim.

l0gicgate avatar l0gicgate commented on June 3, 2024

@flavioheleno then I would suggest creating your own responder or error middleware to address this. It's not hard to extend the existing stuff to achieve what you want to do. I'm closing this as resolved.

from slim.

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.