fixed

Fixed API `error` property

The error property in the API should be either an Object or not present in the response body. This fix prevents an empty error: {} from appearing in the response.