route.status_invalid
Route status is not a SuccessStatus.
Area 7, HTTP; not declinable; the next step is usually the agent's.
A success status is a SuccessStatus; failure statuses come from failure kinds:
type Memo = Text { max_length: 200}type MemoId = Uuid {}type AddMemo = Input { text: Memo}type MemoView = Output { text: Memo}action add_memo(input: AddMemo) -> MemoView { return MemoView { text: input.text }}routes Memos { prefix: /memos POST / { input: AddMemo output: MemoView status: 201 run: add_memo(input) }}
error 201 isn't a success status
--> main.jadpo:27:17
|27 | status: 201 | ^^^ not a `SuccessStatus`
- reason
status:takesSuccessStatus.ok,.created,.acceptedor.no_content; failure statuses come from the kinds of the failures the route can produce, never from the route.- next
- Write
SuccessStatus.created(agent) - rule
- route.
status_ invalid - help
- https://jadpo.
dev/docs/errors/route. status_ invalid
Markdown for agents: /docs/errors/route.status_invalid.md.Built from Jadpo main at aee2e8f.