Skip to content

Commit

Permalink
Don't throw Error on fetch PATCH 501, 405 status (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronelliott authored Jan 19, 2024
1 parent c11245e commit 6f35cd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions whep.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ export class WHEPClient extends EventTarget
body: fragment,
headers
});
if (!fetched.ok)
if (!fetched.ok && fetched.status != 501 && fetched.status != 405)
throw new Error("Request rejected with status " + fetched.status)

//If we have got an answer for the ice restart
Expand Down Expand Up @@ -521,4 +521,4 @@ export class WHEPClient extends EventTarget
headers
});
}
};
};

0 comments on commit 6f35cd7

Please sign in to comment.