Skip to content

Commit

Permalink
Explicitly match null status (#3722)
Browse files Browse the repository at this point in the history
- This can be generated when a request fails with a catch(), though it
  can occur if the status is uninitialised or explicitly set to null.
  • Loading branch information
piersoh committed Aug 17, 2021
1 parent d39b56b commit ca3d95d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/streaming/metrics/utils/DVBErrorsTranslator.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ function DVBErrorsTranslator(config) {

function handleHttpMetric(vo) {
if ((vo.responsecode === 0) || // connection failure - unknown
(vo.responsecode == null) || // Generated on .catch() and when uninitialised
(vo.responsecode >= 400) || // HTTP error status code
(vo.responsecode < 100) || // unknown status codes
(vo.responsecode >= 600)) { // unknown status codes
Expand Down

0 comments on commit ca3d95d

Please sign in to comment.