mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Change abort error code
This commit is contained in:
parent
7bcbde28e4
commit
8a7c149676
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user