API 202 response is expected

This commit is contained in:
Alan Hamlett
2024-10-03 09:05:25 +02:00
parent 925a1fed70
commit 84c2b740cf

View File

@@ -228,7 +228,7 @@ class WakaTimeCore {
if (resp[0].error) { if (resp[0].error) {
await this.putHeartbeatsBackInQueue(heartbeats.filter((h, i) => i === respNumber)); await this.putHeartbeatsBackInQueue(heartbeats.filter((h, i) => i === respNumber));
console.error(resp[0].error); console.error(resp[0].error);
} else if (resp[1] === 201 && resp[0].data?.id) { } else if ((resp[1] === 201 || resp[1] === 202) && resp[0].data?.id) {
await changeExtensionStatus('allGood'); await changeExtensionStatus('allGood');
} else { } else {
if (resp[1] !== 400) { if (resp[1] !== 400) {