At present, when making a request (specifically to oauth2/access_token), errors are quite ambiguous. For example, a developer could face the same error for multiple issues. This makes development and debugging for OAuth 2 considerably less friendly.
A perfect example is an issue I'm facing right now, where despite to the best of my knowledge all details being correct, the same invalid_client error shows irregardless. Doing some research (special thanks to @AntiCompositeNumber for this) reveals that an invalid_client error could be caused by any of the following:
- a non-confidential client
- the client not existing in the repo
- a redirect URI that does not match
- the client secret not matching
- a disallowed grant type
Of course, these are all quite different issues that would be resolved in different ways, but they all result in the same ambiguous error message.