Error Message Improvement Request for Missing Template Error Message

So I spent 3 hours trying to figure out this error. It was a spelling mistake. See if you can see it.

Screen Shot 2020-05-14 at 10.22.02 PM

The error is it’s supposed to be jbuilder not jsonbuilder. This is something I should’ve caught, but the error of the missing template suggests something missing in the controller. (This is on Rails 5.2 btw).

What I’d expect:

Error message now: StatusController#match is missing a template for this request format and variant. request.formats["application/json"].request.variant: []

Something along the lines of: StatusController#match does not have a template for this request format. Check your views folder for a template (i.e. erb, jbuilder, etc.) or in the controller for a format variant. request.formats["application/json"].request.variant: []

This is a simple change but makes it more newbie friendly or tired eyes friendly.

1 Like