Code Monkey home page Code Monkey logo

Comments (8)

avelis avatar avelis commented on June 28, 2024 2

@vince-stark Thanks again for taking an interest in helping out the project. I am always accepting of contributions to make this library better.

from drf-tracking.

triat avatar triat commented on June 28, 2024 1

@avelis I think this one is fixed (if I check the PR which contains the commit #54 )

from drf-tracking.

avelis avatar avelis commented on June 28, 2024

@bkovacev Thanks for writing in. It looks like this an interesting fallout of two PR's 210511e & ab25cb7.

One adds error tracking and the other is to gracefully handle APIRequestLog saving failures. In your scenario when the handle_exception method get's called and assumes the log instance is attached to the request object. That clearly isn't the case.

Quite the bug. I don't have an immediate solution other than determining that why the APIRequestLog isn't saving during the mixins initial method. I would need to write up a test and come up with a solution to gracefully handle this scenario in handle_exception method if no log instance exist.

Also open to a PR if you have the time to address this. Will look into this sometime by next week.

from drf-tracking.

bkovacev avatar bkovacev commented on June 28, 2024

Thank you for the reply! Let me see what I can do about it this weekend 👍 I'll keep you posted!

from drf-tracking.

VincentStark avatar VincentStark commented on June 28, 2024

This bug is also important for another reason - when a logged in user session expires, it triggers the same error, instead of following DRF's authentication scheme, and returning 403 where needed.

So, @bkovacev @avelis any updates? I can help!

from drf-tracking.

avelis avatar avelis commented on June 28, 2024

@vince-stark I will say I am a little pressed for time to come up with a change to fix this. If you have the time, the issue I believe is the side effect of a failed initialized log (with a return statement) and the handle_exception is called and no log attribute exists on the request object. This is the scenario that needs a unit test & fix.

from drf-tracking.

VincentStark avatar VincentStark commented on June 28, 2024

@avelis sounds good - I'll work on it 👍

from drf-tracking.

avelis avatar avelis commented on June 28, 2024

This issue should be addressed in v1.3.1

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.