-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Hi all,
Not sure if this is incorrect usage or a bug, but I'm getting errors when returning error response from my customer handlers.
Example:
public function handleGet(ApiRequest $request)
{
// ...
return new ApiErrorResponse(404, 404, "Product doesn't exist.");
}
Because Handler.php is only looking for instances of "Response" (on Line 84), not ErrorResponse or MultiErrorResponse, it trips up when it tries to load the (non-existent) models.
I'd be happy to submit a simple PR to check for the other two response types, but I didn't know if this was the best way to go about it. Should ErrorResponse and MultiErrorResponse be inheriting from Response instead, or am I "doing it wrong"?
Thoughts?
Kyle
Metadata
Metadata
Assignees
Labels
No labels