Desk: a read of an oversize fork is 422 fork_too_large (#42)

This commit is contained in:
Heimdall 2026-11-11 01:35:07 +00:00
commit 8385eca00f
4 changed files with 32 additions and 3 deletions

View file

@ -189,6 +189,10 @@ public static class DeskEndpoints
{
await WriteJsonAsync(http, 200, IsDecider(context) ? entry : DeskNotes.Strip(entry));
}
else if (found is DeskReadOutcome.ForkTooLarge(var largeFork))
{
await WriteJsonAsync(http, DeskRefusals.ForkTooLargeStatus, DeskRefusals.ForkTooLargeDocument(largeFork));
}
else if (found is DeskReadOutcome.NotFound(var readCode) && DoorMayRefuse(readCode) && readCode != DeskRefusals.RequestIdConflict)
{
await WriteRefusalAsync(http, ReadListCode(readCode));