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

[FEATURE REQUEST] Improve error handling #9

Open
LdDl opened this issue Oct 5, 2020 · 1 comment
Open

[FEATURE REQUEST] Improve error handling #9

LdDl opened this issue Oct 5, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@LdDl
Copy link
Owner

LdDl commented Oct 5, 2020

Is your feature request related to a problem? Please describe.
Here is example of code without any client feedback about error:

func wshandler(wsUpgrader *websocket.Upgrader, w http.ResponseWriter, r *http.Request, app *Application) {
	...
	...
	streamIDSTR := r.FormValue("suuid")
	streamID, err := uuid.Parse(streamIDSTR)
	if err != nil {
		log.Printf("Can't parse UUID: '%s' due the error: %s\n", streamIDSTR, err.Error())
		return
	}
	...
	...
}

It's bad practice, because client doesn't even know who (client or server) is wrong in case when there is no video-stream in player without talking to Back-end programmer.

Describe the solution you'd like and provide pseudocode examples if you can
Just wrtie some fancy error codes (with text) for most of cases.

Describe alternatives you've considered and provide pseudocode examples if you can
nope

Additional context
nope

@LdDl LdDl added the enhancement New feature or request label Oct 5, 2020
@LdDl LdDl assigned LdDl and morozka Oct 5, 2020
@LdDl
Copy link
Owner Author

LdDl commented Oct 12, 2020

assigned @morozka
Do 50x, 40x for WS (status + response) and HTTP (static HLS) request

@morozka morozka mentioned this issue Oct 26, 2020
LdDl added a commit that referenced this issue Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants