refactor error code determination
refactor error code determination

gravyboat/streamlink,gravyboat/streamlink,melmorabity/streamlink,javiercantero/streamlink,javiercantero/streamlink,back-to/streamlink,wlerin/streamlink,chhe/streamlink,wlerin/streamlink,bastimeyer/streamlink,bastimeyer/streamlink,chhe/streamlink,beardypig/streamlink,beardypig/streamlink,melmorabity/streamlink,streamlink/streamlink,streamlink/streamlink,back-to/streamlink