docket: show error msgs earlier during glob upload

The error could mean that we don't have a valid `desk`. We want to show that
message, instead of trying to `(~(got by charges) desk)`.

Fixes #5282.
This commit is contained in:
fang 2021-10-01 15:25:38 +02:00 committed by GitHub
parent 51f4c83352
commit 7ca810f2cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -510,6 +510,12 @@
[[404^~ ~] [~ state]]
::
=; [desk=@ta =glob err=(list @t)]
=* error-result
:_ [~ state]
[[400 ~] `(upload-page err)]
::
?. =(~ err) error-result
::
=* cha ~(. ch desk)
=/ =charge (~(got by charges) desk)
::
@ -518,9 +524,7 @@
=? err !?=(%glob -.href.docket.charge)
['desk does not use glob' err]
::
?. =(~ err)
:_ [~ state]
[[400 ~] `(upload-page err)]
?. =(~ err) error-result
:- [[200 ~] `(upload-page 'successfully globbed' ~)]
?> ?=(%glob -.href.docket.charge)
::