mirror of https://github.com/danoloan10/rss-bridge
fix: don't bork upstream with http status code -1 (#2690)
This commit is contained in:
parent
641e2eedf5
commit
b2f1d051fc
|
@ -28,6 +28,9 @@ try {
|
||||||
}
|
}
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
error_log($e);
|
error_log($e);
|
||||||
header('Content-Type: text/plain', true, $e->getCode());
|
$code = $e->getCode();
|
||||||
|
if ($code !== -1) {
|
||||||
|
header('Content-Type: text/plain', true, $code);
|
||||||
|
}
|
||||||
die($e->getMessage());
|
die($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue