Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swallowing meaningful errors from rest API #166

Open
synthmusic opened this issue Sep 15, 2017 · 1 comment
Open

Swallowing meaningful errors from rest API #166

synthmusic opened this issue Sep 15, 2017 · 1 comment
Labels

Comments

@synthmusic
Copy link
Contributor

... else {
	callback(new errors.RequestError('Unexpected response from OpenTok'));
}

is used many times in archiving.js, which will obfuscate what may be an actual usable error message from the openTok rest api. I'm thinking to submit an update, but of course checking first if this goes against some strategy in place on purpose. Perhaps a new error type in errors.js? Problem being the objects only take messages and not the error code, so might need to "stringify" the code in the message

@CatGuardian
Copy link
Contributor

I was just having a similar thought.

If you are going to to do this then please add a 'statusCode' parameter to the error objects. And then assign the HTTP status response code to all of the errors in this system.

https://tokbox.com/developer/rest/#stop_archive

The problem I'm running into is that I want to know that a 409 is thrown during stopArchiving instead of having to rely on a string from the opentok API.

@manchuck manchuck added the stale label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants