Desk: a read of an oversize fork is 422 fork_too_large (#42)
This commit is contained in:
parent
7e9ba5796b
commit
8385eca00f
4 changed files with 32 additions and 3 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue