mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-14 06:36:46 +00:00
feat: improve error handling for election event loading
This commit is contained in:
@@ -95,7 +95,9 @@ $loadEvents = function () {
|
|||||||
$response = $request->send();
|
$response = $request->send();
|
||||||
|
|
||||||
// Check for errors in the response
|
// Check for errors in the response
|
||||||
if (isset($response[config('services.relay')][0]) && isset($response[config('services.relay')][0][0]) && $response[config('services.relay')][0][0] === 'ERROR') {
|
if (isset($response[config('services.relay')][0][0]) && $response[config(
|
||||||
|
'services.relay'
|
||||||
|
)][0][0] === 'ERROR') {
|
||||||
abort(500, 'Kann keine Events laden. Nostr Relay antwortet nicht.');
|
abort(500, 'Kann keine Events laden. Nostr Relay antwortet nicht.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -135,7 +135,9 @@ $loadEvents = function () {
|
|||||||
$response = $request->send();
|
$response = $request->send();
|
||||||
|
|
||||||
// Check for errors in the response
|
// Check for errors in the response
|
||||||
if (isset($response[config('services.relay')][0]) && isset($response[config('services.relay')][0][0]) && $response[config('services.relay')][0][0] === 'ERROR') {
|
if (isset($response[config('services.relay')][0][0]) && $response[config(
|
||||||
|
'services.relay'
|
||||||
|
)][0][0] === 'ERROR') {
|
||||||
abort(500, 'Kann keine Events laden. Nostr Relay antwortet nicht.');
|
abort(500, 'Kann keine Events laden. Nostr Relay antwortet nicht.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user