Skip to main content

Function: nextStatus()

function nextStatus(from, to): SubmissionStatus;

Defined in: packages/core/src/submission/submission.ts:227

Guarded transition: returns to, or throws. Re-stating the current status is a legal no-op so idempotent writes (a retried patch(id, { status })) do not blow up.

There is no dedicated code in the frozen catalogue (docs/17 §16) for a state error, so this reports RASD_SCHEMA_INVALID with a reason discriminator.

Parameters

ParameterType
fromSubmissionStatus
toSubmissionStatus

Returns

SubmissionStatus