video-server
video-server copied to clipboard
[FEATURE REQUEST] Improve error handling
trafficstars
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
assigned @morozka Do 50x, 40x for WS (status + response) and HTTP (static HLS) request