Code Monkey home page Code Monkey logo

Comments (6)

aschn avatar aschn commented on July 30, 2024

@zatarus want to take a look at PR #18 and see if it works for you? thanks :)

from drf-tracking.

zatarus avatar zatarus commented on July 30, 2024

Hey @aschn, thank you for taking time on this. I have found a behavior with drf, where if exception handler's response is empty, it will raise the exception itself (regardless of debug mode) and it will prevent mixin's handling to be called. Here is the location:

https://github.com/tomchristie/django-rest-framework/blob/78e4ea0d6e88a7b355ec3e790ef0e8f95859ca2d/rest_framework/views.py#L434

Default exception function by restframework also explains it as:

Any unhandled exceptions may return None, which will cause a 500 error to be raised.

so calling super handle_exception seems unreliable for anything that is not handled such as ParseError(), or raise of any exception other than APIException. In my case, I just wanted to cover all :)

Do you agree if calling super should be wrapped in try/except or I should implement my own exception class to wrap them all? If secondary, that implementation is fair already.

from drf-tracking.

triat avatar triat commented on July 30, 2024

I think this one can be closed now with the new PR that you just merged @avelis

from drf-tracking.

avelis avatar avelis commented on July 30, 2024

@triat I will close it when I get a release out. Keeps me honest to get it out.

from drf-tracking.

triat avatar triat commented on July 30, 2024

No worries :) I'm just trying to follow things correctly :) Thanks for your time

from drf-tracking.

avelis avatar avelis commented on July 30, 2024

Addressed in version 1.2.0 release.

from drf-tracking.

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.