Cannot read property 'match' of undefined - undecipherable error

I want to port my Ghost theme to 2.0, but the error messages are completely unhelpful.
I’m getting a 500 in my default.hbs.

[default.hbs] Cannot read property 'match' of undefined.

It’s very likely a deprecated handlebar template, but I have absolutely zero way of finding out which one. Unless I completely empty out the default.hbs, the error doesn’t go away.
And the stacktraces aren’t helpful at all.

How am I supposed to resolve this?

InternalServerError: [default.hbs] Cannot read property 'match' of undefined
    at new GhostError (/var/www/
    at _private.prepareError (/var/www/
    at Layer.handle_error (/var/www/
    at trim_prefix (/var/www/
    at /var/www/
    at Function.process_params (/var/www/
    at next (/var/www/
    at Layer.handle_error (/var/www/
    at trim_prefix (/var/www/
    at /var/www/
    at Function.process_params (/var/www/
    at (/var/www/
    at Immediate.<anonymous> (/var/www/
    at runCallback (timers.js:812:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5)

TypeError: [default.hbs] Cannot read property 'match' of undefined
    at getAssetUrl (/var/www/
    at Object.asset (/var/www/
    at Object.eval [as main] (eval at createFunctionContext (/var/www/, <anonymous>:6:68)
    at main (/var/www/
    at ret (/var/www/
    at ret (/var/www/
    at renderTemplate (/var/www/
    at _stackRenderer (/var/www/
    at /var/www/
    at Function.Waiter.done (/var/www/
    at renderTemplate (/var/www/
    at render (/var/www/
    at renderIt (/var/www/
    at /var/www/
    at ExpressHbs.cacheLayout (/var/www/
    at parseLayout (/var/www/

The asset helper is “broken”. It seems to require a string now.

{{asset css/styles.min.css}} is broken as of v2, while it was working fine before.
Raplace with {{asset "css/styles.min.css"}}.

First - I agree that the indecipherable error could be better here - we should validate the helper input.

However, given what {{asset css/styles.min.css}} means in handlebars, I’m extremely surprised that it ever worked. Without passing the value as a string, handlebars will assume that css/styles.min.css is the key name of a local data property that it can access - i.e. it’ll look for data in your content that matches this key. As it wouldn’t find anything matching, my expectation would be that the helper would evaluate to null / an empty string rather than throw an error.

Also, the code that’s throwing the error also hasn’t changed in 2 years so for curiosities sake, what version did you last run your theme on?

So am I.

I ran the theme last on 1.10.x. It worked just fine.