Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[Enhancement] More informative signaling error messages #43

Closed
suggestedfixes opened this issue May 11, 2020 · 5 comments
Closed

[Enhancement] More informative signaling error messages #43

suggestedfixes opened this issue May 11, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@suggestedfixes
Copy link

suggestedfixes commented May 11, 2020

From time to time, we receive an error event that was implemented in the js sdk.
For example, we get status code of 400 from time to time.
From this document
https://docs.aws.amazon.com/kinesisvideostreams-webrtc-dg/latest/devguide/kvswebrtc-websocket-apis-1.html, we know that it is either ClientLimitExceededException or InvalidArgumentException. But we can only guess what the error is. It would be nice to reinterpret the Websocket Error into an Error with meaningful name.

@lherman-cs lherman-cs added the enhancement New feature or request label May 12, 2020
@lherman-cs
Copy link
Contributor

@suggestedfixes Do you mind to describe what you mean by "guess" in the case? As you've mentioned here that a 400 error can be either ClientLimitExceededException or InvalidArgumentException. Doesn't that give you the error kinds?

@MushMal
Copy link

MushMal commented May 26, 2020

@suggestedfixes also, which API are you referring to? The data plane APIs are limited.

@suggestedfixes
Copy link
Author

suggestedfixes commented Jun 3, 2020

@lherman-cs @MushMal
As described in issue #41
The Error Format caught is

Event {isTrusted: true, type: "error", target: WebSocket, currentTarget: WebSocket, eventPhase: 2, …}
bubbles: false
cancelBubble: false
cancelable: false
composed: false
currentTarget: WebSocket {url: "wss://v-dc297268.kinesisvideo.us-east-2.amazonaws.…36a2fafd25a96fa0aeac3dd0&X-Amz-SignedHeaders=host", readyState: 3, bufferedAmount: 0, onopen: null, onerror: null, …}
defaultPrevented: false
eventPhase: 0
isTrusted: true
path: []
returnValue: true
srcElement: WebSocket {url: "wss://v-dc297268.kinesisvideo.us-east-2.amazonaws.…36a2fafd25a96fa0aeac3dd0&X-Amz-SignedHeaders=host", readyState: 3, bufferedAmount: 0, onopen: null, onerror: null, …}
target: WebSocket {url: "wss://v-dc297268.kinesisvideo.us-east-2.amazonaws.…36a2fafd25a96fa0aeac3dd0&X-Amz-SignedHeaders=host", readyState: 3, bufferedAmount: 0, onopen: null, onerror: null, …}
timeStamp: 9966.775000095367
type: "error"
__proto__: Event

Now besides the client limit exceeded for 400, another thing that could go wrong is the signing of the endpoint failed due to invalid arguments.

I couldn't find that data structure that holds the Amazon error type. From my limited javascript knowledge, maybe extending the Websocket object to include more attributes such as aws-error-type might work?

Also from https://docs.aws.amazon.com/kinesisvideostreams-webrtc-dg/latest/devguide/kvswebrtc-websocket-apis-1.html. I might have interpreted incorrectly, seems like there is a method to capture the Exception type. I'm likely not aware of the technique that can capture the Exception Name and string.

@suggestedfixes
Copy link
Author

@MushMal I'm referring to SignalingClient.on('error', handler); API

@hassanctech
Copy link
Contributor

This will require some deeper investigation on our part, we will get back to you here once we've had a chance to investigate this.

@awslabs awslabs locked and limited conversation to collaborators Feb 23, 2023
@jdelapla jdelapla converted this issue into discussion #216 Feb 23, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants