DEV Community

loading...

Spring boot error messages disabled!

kudzaitsapo profile image Kudzai Tsapo ・1 min read

So, I went through a lot of hell trying to figure out why the f-word my messages weren't showing. Guess what? Apparently, the are now disabled by default! 😑

Alt Text
After spending a few hours wondering why my code wasn't working, I finally stumbled upon the reason.

Apparently, the default value for server.error.include-message is "never".

So, I went into my code (application.properties) and had to do the following:

server.servlet.context-path=/api/v1
server.error.include-message=always
server.error.include-binding-errors=always
Enter fullscreen mode Exit fullscreen mode

...
What's that? It's non-standard, you say?
Well, get off my back! It works, doesn't it?

In case someone is having the same issue and like me they're wondering wtf is going on, this should be able to help.

Discussion (0)

pic
Editor guide