Laravel Tutorials

Decide with Jev: Make Failed AI Requests Safe in Laravel

Published

Episode 5 of Decide with Jev is out. It runs about seven minutes.

Say a draft passed a check earlier and got "ready for editor". Then the next request times out. If that old label stays on the screen, it looks like the new check passed too. It didn't.

In this episode, a failed request gets its own result. Every check now starts a new run with no answers and a needs review label. Only a finished model call and a finished policy check can replace that. If either one fails, the run is saved as failed, and the old result is gone.

The video also shows:

  • how Laravel already stops a draft that is only spaces
  • size limits for the brief and the draft
  • a timeout, and why it isn't a promise about how fast the model answers
  • what goes into the log, and what stays out of it
  • a test that fakes a service error so no real request is sent

There's also a short demo where I break the request on purpose. You can see the failed run show up in the browser.

The code is on the episode-5 branch of the Decide with Jev repository. You can watch the whole series in the playlist.

Harris Raftopoulos photo

Senior Software Engineer • Staff & Educator @ Laravel News • Co-organizer @ Laravel Greece Meetup

Sponsored

laravelcloud logo
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud

The latest

View all →
Black Friday: Learn the habits behind AI workflows that work image

Black Friday: Learn the habits behind AI workflows that work

Read article
Laravel Black Friday and Cyber Monday Deals 2026 image

Laravel Black Friday and Cyber Monday Deals 2026

Read article
pgjumbo: A PostgreSQL Client for macOS, Windows, and Linux image

pgjumbo: A PostgreSQL Client for macOS, Windows, and Linux

Read article
Laranon: Reversible PII Anonymization for Laravel and LLMs image

Laranon: Reversible PII Anonymization for Laravel and LLMs

Read article
PHP 8.6 is released!  image

PHP 8.6 is released!

Read article
Laravel Warrant: Row-Level Permissions With Eloquent image

Laravel Warrant: Row-Level Permissions With Eloquent

Read article