Skip to content

[FEATURE REQUEST] Improve error handling #9

Description

@LdDl

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions