Exhaustive Oauth Error Codes


#1

Hello.

Hubspot's API is not mentioning error messages that we might expect when OAuth Tokens are invalid, expired, etc.

Is there any Exhaustive list of error messages that we might expect?


#2

Hi @baptistejamin,

There isn't a single exhaustive list of all possible OAuth-related errors, but all HubSpot errors have a human readable messaging that describes the issue. If you run into an error that you don't understand, I would recommend searching in the forums for similar errors and/or posting and I'd be happy to help. You might also find the following developer doc helpful:


#3

@Derek_Gervais

It's difficult to parse the human readable messages and infer what logic to apply, given that there's no exhaustive list of all errors and their messages.

For example: if one performs an action based off the error message containing the string "foo", how could one be certain that there are no other error messages that exist today or in the future that contain the string "foo"?

There's no guarantee that the error messages will not change in the future, which would break integrations that depend on error messages (feels brittle).

Would it be possible on HubSpot's end to produce an exhaustive list of the error messages and status codes to help developers create more robust applications? Would love to hear your thoughts!


#4

Hi @kschiu,

I absolutely agree; I don't mean to imply that a comprehensive list isn't a good idea, or even that it's not something we'll do. I'm going on vacation next week and full disclosure, I don't think I'll be able to get something like this for you by the end of the day today. Let me touch base with the authentication team here in a week and see if we can put together a (mostly) comprehensive lists of errors. Does that sound reasonable?


#5

@Derek_Gervais

That sounds reasonable, any kind of list would be very helpful - thanks for getting back to me, I appreciate it! Enjoy your vacation!