Black Friday: the Laravel testing course is $149 instead of $249, through Dec 7. See the course →
logo

Actually read the whole error message

This seems really simple and obvious, but I've been burned in the past not doing this myself.

Joel Clermont
Joel Clermont
2023-10-25

From our daily Laravel tips email. Get the next one in your inbox.

Sometimes I'll hit an error and the solution is literally staring me in the face, but I'll gloss over it and focus on the wrong thing. This can especially be a challenge if you're frustrated or feeling time pressure.

Here's an example of an error message bubbling up from SQL when attempting to use a model factory

SQL error text

Why did my eyes scan this instead of reading it? The error is long. It has a lot of random data from Faker. Worst of all, I thought I found the relevant bit at the beginning: "Column not found".

If I had just taken the 2 minutes to actually read through the whole error, I would have arrived at a solution much more quickly. The lesson learned for me: don't rush, don't get flustered. Take a deep breath and read the whole error message.

Any eagle-eyed readers have a guess what the error was? Hit reply, and I'll let you know if you were right.

Here to help,

Joel

P.S. We all get stuck on things like this from time to time. Don't stare at the screen any longer than you have to.

Want a tip like this in your inbox every weekday?

Each one takes less than 2 minutes to read. Join 4,000+ Laravel developers who already get them.

email
No spam. Only real-world advice.
Toss a coin in the jar if you found this helpful.