Skip to content
Snippets Groups Projects
Commit a26d0053 authored by Nick Daugherty's avatar Nick Daugherty
Browse files

Overloaded __call() to transparently handle Exceptions in production

Most Exceptions are thrown from API timeouts - which are more difficult
to find in testing.

To prevent fatals in production, this transparently handles Exceptions
in __call(), returning an empty array instead.

Room for improvement - store the Exception information as a WP_Error in
a protected var.

- Determine what the expected response type is. For example, status
updates don't expect an array response - an appropriate response should
be returned for the request.
parent 15d9226e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment