Skip to content

Commit 43bdfd6

Browse files
committed
fix(webapp): surface promote/rollback action errors on the form
The deployment promote and rollback actions assigned errors to a runParam field that does not exist in their form schema (copied from the run routes), so Conform never rendered them. Use the root-level error key instead.
1 parent 47904d1 commit 43bdfd6

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

apps/webapp/app/routes/resources.$projectId.deployments.$deploymentShortCode.promote.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ export const action = dashboardAction(
9393
stack: error.stack,
9494
},
9595
});
96-
submission.error = { runParam: [error.message] };
96+
submission.error = { "": [error.message] };
9797
return json(submission);
9898
} else {
9999
logger.error("Failed to promote deployment", { error });
100-
submission.error = { runParam: [JSON.stringify(error)] };
100+
submission.error = { "": [JSON.stringify(error)] };
101101
return json(submission);
102102
}
103103
}

apps/webapp/app/routes/resources.$projectId.deployments.$deploymentShortCode.rollback.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ export const action = dashboardAction(
9393
stack: error.stack,
9494
},
9595
});
96-
submission.error = { runParam: [error.message] };
96+
submission.error = { "": [error.message] };
9797
return json(submission);
9898
} else {
9999
logger.error("Failed to roll back deployment", { error });
100-
submission.error = { runParam: [JSON.stringify(error)] };
100+
submission.error = { "": [JSON.stringify(error)] };
101101
return json(submission);
102102
}
103103
}

0 commit comments

Comments
 (0)