Code Monkey home page Code Monkey logo

Comments (5)

alexzarbn avatar alexzarbn commented on June 1, 2024

Hi @rbayley,

Have you tried applying query parameters specific to the Soft Deletable resources?

from laravel-orion.

rbayley avatar rbayley commented on June 1, 2024

Hi Alex,

Yes, I did, that's why I am able to soft delete and force delete the record.

The problem is when trying to GET or UPDATE the record after it has been soft or forced deleted. Record no longer exists and therefore Laravel replies with an error.

In other words, Laravel throws an Exception when fetching an inexistent record.

from laravel-orion.

alexzarbn avatar alexzarbn commented on June 1, 2024

@rbayley

If you are looking to customize how errors are returned in the response, I believe checking the render method in App\Exceptions\Handler and Illuminate\Foundation\Exceptions\Handler might be a good idea 🤔

from laravel-orion.

rbayley avatar rbayley commented on June 1, 2024

@alexzarbn ouch !

I thought you might be throwing specific errors. Next time I will dig more into your code. But yeah, its the logical way.
After posting my question, I thought you would come up with something like that! 😢

Once again, great, great package!

from laravel-orion.

alexzarbn avatar alexzarbn commented on June 1, 2024

@rbayley

404 is already a specific error, throwing something else would be a violation of many standards, I think.

from laravel-orion.

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.