mirror of
https://github.com/samsonjs/media.git
synced 2026-04-09 11:55:46 +00:00
throw InvalidResponseCodeException instead of HttpDataSourceException
if responseCode and responseMessage ara available always throws an InvalidResponseCodeException instead of HttpDataSourceException, so in onPlayerError method the http status code and message can be used to decide what will be the next step.
This commit is contained in:
parent
1347d572ef
commit
625c46e963
1 changed files with 2 additions and 2 deletions
|
|
@ -377,8 +377,8 @@ public class DefaultHttpDataSource extends BaseDataSource implements HttpDataSou
|
|||
errorResponseBody =
|
||||
errorStream != null ? Util.toByteArray(errorStream) : Util.EMPTY_BYTE_ARRAY;
|
||||
} catch (IOException e) {
|
||||
throw new HttpDataSourceException(
|
||||
"Error reading non-2xx response body", e, dataSpec, HttpDataSourceException.TYPE_OPEN);
|
||||
throw new InvalidResponseCodeException(
|
||||
responseCode, responseMessage, headers, dataSpec, null);
|
||||
}
|
||||
closeConnectionQuietly();
|
||||
InvalidResponseCodeException exception =
|
||||
|
|
|
|||
Loading…
Reference in a new issue