• Nick Daugherty's avatar
    Overloaded __call() to transparently handle Exceptions in production · a26d0053
    Nick Daugherty authored
    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.
    a26d0053