Is it possible for this to return anything other than a hashref? If it returns undef, for example, the line below this one will auto-vivify the return value into a hash. Then, since error will be undef, it won't return an error code, and instead will return a redirect to blank.