Skip to content
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.

Validate verb+endpoint combinations before the HTTP call is fired #7

Open
igorsantos07 opened this issue Jul 16, 2017 · 0 comments
Open

Comments

@igorsantos07
Copy link
Contributor

Not all endpoints have all operations available. This was solved for the Webhooks endpoint as it needs some custom methods as well, but it would defeat the purpose of the magic calls happening in the library for other endpoints.

Instead, on debug mode (i.e. Config::debugLevel(DEBUG_BASIC)) we should run conservative validation rules to warn the developer the call they're trying to run is not available on the API. There are already specifications for that (on BaseEndpoint::$specs) but that's not yet used.

That's more friendly than a random 404 error with no specification on what went wrong from ProsperWorks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant