Change abort error code

This commit is contained in:
Hillel Coren 2017-07-24 17:06:15 +03:00
parent 7bcbde28e4
commit 8a7c149676

View File

@ -34,7 +34,7 @@ class LookupModel extends Eloquent
if ($lookupAccount) { if ($lookupAccount) {
$data['lookup_account_id'] = $lookupAccount->id; $data['lookup_account_id'] = $lookupAccount->id;
} else { } else {
abort(404, 'Lookup account not found for ' . $accountKey); abort(500, 'Lookup account not found for ' . $accountKey);
} }
static::create($data); static::create($data);
@ -96,7 +96,7 @@ class LookupModel extends Eloquent
->first(); ->first();
} }
if (! $isFound) { if (! $isFound) {
abort(404, "Looked up {$className} not found: {$field} => {$value}"); abort(500, "Looked up {$className} not found: {$field} => {$value}");
} }
Cache::put($key, $server, 120); Cache::put($key, $server, 120);