Sync / foldkit-durable

OperationRejectedError

class · packages/durable/src/errors.ts:66

class OperationRejectedError extends Schema.TaggedError<OperationRejectedError>()(
  'OperationRejectedError',
  {
    opId: OpId,
    message: Schema.String,
    reason: Schema.optional(Schema.String),
  },
) {}

The application's authorization policy refused the operation. reason is the refusing rule's own words, present only when authorize returned one; the message repeats it so a caller that only forwards messages still shows it.

In the guides