summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-08-13 20:48:11 +0200
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-08-13 20:48:11 +0200
commitf462b95adf2c18c9a734187b58281da258439db4 (patch)
tree4f66da3224892bc4ac829e17f2fe130912f9d720 /lib
parent0480e138969f065034bcebc8be4f6759cd9f74f8 (diff)
wagonorder: always reject promise with plain-text strings4.29.8
Diffstat (limited to 'lib')
-rw-r--r--lib/DBInfoscreen/Helper/Wagonorder.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/DBInfoscreen/Helper/Wagonorder.pm b/lib/DBInfoscreen/Helper/Wagonorder.pm
index 5b69da9..eb5cd74 100644
--- a/lib/DBInfoscreen/Helper/Wagonorder.pm
+++ b/lib/DBInfoscreen/Helper/Wagonorder.pm
@@ -56,7 +56,9 @@ sub get_p {
if ( my $content = $cache->thaw($url) ) {
$self->{log}->debug("wagonorder->get_p($url): cached");
if ( $content->{error} ) {
- return $promise->reject($content);
+ return $promise->reject(
+"GET $url: HTTP $content->{error}{code} $content->{error}{message} (cachd)"
+ );
}
return $promise->resolve( $content, \%param );
}
@@ -77,7 +79,7 @@ sub get_p {
"wagonorder->get_p($url): HTTP $err->{code} $err->{message}"
);
$cache->freeze( $url, $json );
- $promise->reject($json);
+ $promise->reject("GET $url: HTTP $err->{code} $err->{message}");
return;
}