laminas-api-tools / api-tools

Laminas API Tools module for Laminas
https://api-tools.getlaminas.org/documentation
BSD 3-Clause "New" or "Revised" License
37 stars 19 forks source link

How to customise fetch response? #6

Open weierophinney opened 4 years ago

weierophinney commented 4 years ago

Hi,

I am using rest api.

In entity, fetch(), if I am getting empty data then it will return following result default:

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Found", "status": 404, "detail": "Entity not found." }

But in my case it will be better if return empty array like [].

How can I customise fetch response as per my need?

Thanks in advance!!


Originally posted by @sarathbabuSwamynathan at https://github.com/zfcampus/zf-apigility/issues/189