Closed normanbraun closed 11 years ago
I discussed this with matthew yesterday, the plan is were going to change all the the methods to listen on Exceptions, ApiProblem and ApiProblemInterface.
ah ok. sounds good. thank you for the information.
One note: in all cases of the methods that currently have exception handling, I have a documented exception type declared to allow listeners to raise specific exceptions that map 1:1 with specific API Problem and HTTP statuses. In the methods that do not have exception handling currently, there is no clear 1:1 mapping of error to HTTP status; we can really only have a 500 status in such cases.
As such, I'll simply catch the global \Exception
class, and pass it to a new ApiProblem
instance in order to return it.
Is there a reason that exception handling is only implemented for update, create, replaceList and patch methods?