You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, is there a way to, instead of throwing an exception, return a json that tells you the not allowed filters?
For example, if my allowed filters are like this:
->allowedFilters('is_published', 'category')
and I have a query like this:
?filter[category]=Pop&filter[wrongField]=wrongValue
I want to return a json like this:
{
"success": false,
"code": 400,
"error": {
"message": "Bad Request",
"debug": {"Not allowed filters": [ 'wrongField'] }"
}
}
Beta Was this translation helpful? Give feedback.
All reactions