At several points in the code the same request is performed to first check its return value and
then perform the exact same request again to either get the error message or to parse the return value.
Example:
|
if (github:request($url, $config?token)[1]/xs:integer(@status) ne 200) then ( |
|
map { |
|
"message" : concat($config?vcs, " error: ", github:request($url, $config?token)[1]/xs:string(@message)) |
|
} ) |
|
else ( |
|
let $request := github:request($url, $config?token) |