Incident ids
This commit is contained in:
parent
986791fea1
commit
335d8fb4f5
|
|
@ -16,9 +16,12 @@ class API {
|
|||
}
|
||||
|
||||
function InvokeError($errorCode, $message) {
|
||||
$incident = md5(time()*8^42);
|
||||
$incidentRand = ["azrt4o", "30jg49k", "nigm4gd"];
|
||||
$incident = substr_replace($incident, $incidentRand[array_rand($incidentRand)], 15, 0);
|
||||
http_response_code($errorCode);
|
||||
header("Content-Type: application/json");
|
||||
exit(API::PrettyJSONEncode(["error"=>"$message"]));
|
||||
exit(API::PrettyJSONEncode(["error"=>"$message", "incidentID"=>$incident]));
|
||||
}
|
||||
|
||||
function PrettyJSONEncode($array){
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
ErrorDocument 404 /index.php
|
||||
Loading…
Reference in New Issue