Add Sentry error captures
This commit is contained in:
parent
7b8e41d50d
commit
766f132451
@ -41,6 +41,7 @@ try {
|
|||||||
}
|
}
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
sendJsonResp($ex->getMessage(), "ERROR");
|
sendJsonResp($ex->getMessage(), "ERROR");
|
||||||
|
\Sentry\captureException($ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
exitWithJson($output);
|
exitWithJson($output);
|
||||||
|
@ -69,6 +69,7 @@ try {
|
|||||||
"status" => "ERROR",
|
"status" => "ERROR",
|
||||||
"msg" => $ex->getMessage()
|
"msg" => $ex->getMessage()
|
||||||
];
|
];
|
||||||
|
\Sentry\captureException($ex);
|
||||||
$memcache->set("logistics.tracking.$code.$carrier", json_encode($output), 60 * 10);
|
$memcache->set("logistics.tracking.$code.$carrier", json_encode($output), 60 * 10);
|
||||||
exitWithJson(downgradeResponseVersion($output, $revision));
|
exitWithJson(downgradeResponseVersion($output, $revision));
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ try {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
|
\Sentry\captureException($ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -199,7 +199,7 @@ try {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
|
\Sentry\captureException($ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check local spammer database
|
// Check local spammer database
|
||||||
|
@ -60,4 +60,5 @@ try {
|
|||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Logger::log("network.whois error: " . $e->getMessage());
|
Logger::log("network.whois error: " . $e->getMessage());
|
||||||
sendJsonResp("An unknown error occurred.", "ERROR");
|
sendJsonResp("An unknown error occurred.", "ERROR");
|
||||||
|
\Sentry\captureException($ex);
|
||||||
}
|
}
|
@ -26,7 +26,7 @@ header("Access-Control-Allow-Origin: *");
|
|||||||
// Composer
|
// Composer
|
||||||
require __DIR__ . '/vendor/autoload.php';
|
require __DIR__ . '/vendor/autoload.php';
|
||||||
|
|
||||||
Sentry\init(['dsn' => 'https://1cb615831d87433c941e1bd7e7df3d0b@bugs.netsyms.net/3']);
|
\Sentry\init(['dsn' => 'https://1cb615831d87433c941e1bd7e7df3d0b@bugs.netsyms.net/3']);
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
require __DIR__ . '/env.php';
|
require __DIR__ . '/env.php';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user