Open anapaulagomes opened 2 weeks ago
It should also check the output of /oauth2/token
:
{"error": "invalid_grant", "error_description": "refresh token is malformed"}
{"error": "invalid_client: Invalid client_id or client_secret"}
vs
{"access_token": "sl....", "token_type": "bearer", "expires_in": 14400}
And the requests I'm seeing currently don't reply with JSON for most errors, e.g.:
Error in call to API function "files/upload": Must provide HTTP header "Authorization" or URL parameter "authorization".
Error in call to API function "files/upload": Invalid authorization value in HTTP header "Authorization": "...". Expecting "Bearer <oauth2-access-token>
Error in call to API function "files/upload": HTTP header "Dropbox-API-Arg": path: The root folder is unsupported.
This might only be the upload endpoint, perhaps because it's not using application/json in the request?
Thanks for putting this action together! It would be nice to have it fail when an error is returned from the curl command. A few examples here: