fix: accept HTTP 202 as success from Ivanti workflow creation

Ivanti returns 202 (Accepted) for async job creation, not just 200/201.
This commit is contained in:
jramos
2026-04-08 12:26:35 -06:00
parent 41f9c35586
commit 328e48ea8c

View File

@@ -273,7 +273,7 @@ function createIvantiFpWorkflowRouter(db, requireAuth) {
}
// Handle error responses from Ivanti
if (createResult.status !== 200 && createResult.status !== 201) {
if (createResult.status !== 200 && createResult.status !== 201 && createResult.status !== 202) {
const errorMap = {
401: 'Ivanti API key is invalid or missing.',
419: 'API key lacks workflow creation permissions.',