Skip to content

Commit

Permalink
fix(router): Handle errors without description
Browse files Browse the repository at this point in the history
Can occur when deploying apps. There is a value though!

this is caused by a bug on exist-db: eXist-db/exist#4686
  • Loading branch information
DrRataplan committed Aug 21, 2024
1 parent 8a9ebd9 commit 9faa293
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/router.xql
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,11 @@ declare %private function router:resolve-ref ($config as map(*), $parts as xs:st
: Add line and source info to error description. To avoid outputting multiple locations
: for rethrown errors, check if $value is set.
:)
declare %private function router:error-description ($description as xs:string, $line as xs:integer?, $column as xs:integer?, $module as xs:string?, $value as item()*) as xs:string {
declare %private function router:error-description ($description as xs:string?, $line as xs:integer?, $column as xs:integer?, $module as xs:string?, $value as item()*) as xs:string {
if ($line and $line > 0 and empty($value)) then
``[`{$description}` [at line `{$line}` column `{$column}` in module `{head(($module, 'unknown'))}`]]``
else
$description
($description, $value)[1]
};

(:~
Expand Down

0 comments on commit 9faa293

Please # to comment.