Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating a client process can fail with a model not found exception #358

Closed
lindyhopchris opened this issue May 28, 2019 · 0 comments
Closed
Labels
Milestone

Comments

@lindyhopchris
Copy link
Member

A ModelNotFoundException can be caused by the UpdateClientProcess listener, for example:

Illuminate\Database\Eloquent\ModelNotFoundException: No query results for model [App\Post].

/vagrant/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:414
/vagrant/vendor/laravel/framework/src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php:85
/vagrant/vendor/laravel/framework/src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php:55
/vagrant/vendor/laravel/framework/src/Illuminate/Queue/SerializesModels.php:45
/vagrant/vendor/cloudcreativity/laravel-json-api/src/Queue/UpdateClientProcess.php:58
/vagrant/vendor/cloudcreativity/laravel-json-api/src/Queue/UpdateClientProcess.php:36

Encountered this in a scenario where the model that was a job property is deleted as part of that job. So when the listener is deserializing the job payload, the model can no longer be reconstituted and the exception is triggered.

@lindyhopchris lindyhopchris added this to the 1.x milestone May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant