Hint about restore_redis script on missing redis metadata
When user metadata isn't found in redis it would be nice to log an hint about running restore_redis, as that's often what fixes these cases on development or otherwise new installs.
Windshaft-CartoDB already does this, so would be consistent for "cartodb APIs" to also do here.
Actually, I see the hinting is done by cartodb-redis module, not sure why it doesn't appear in the CartoDB-SQL-API
See https://github.com/CartoDB/node-cartodb-redis/blob/v0.3.0/lib/carto_metadata.js#L81
It's because in the usage from CartoDB-SQL-API it's not handling any error https://github.com/CartoDB/CartoDB-SQL-API/blob/master/app/controllers/app.js#L287-L296
It actually is handling the error, but it looks like it's intentionally modifying it: https://github.com/CartoDB/CartoDB-SQL-API/blob/master/app/controllers/app.js#L300-L303
The modification was probably meant for the enduser, but in the log we'd still want the full error
I'd just review if the cartodb-redis module error is "safe" to show to the user (I think it likely is) and confirmed that just drop the err.message override (keeping the http_response addition)
Maybe one way to deal with log vs. enduser message separation would be to add an optional "user_message" to the Error object thrown. The responder would then show that one to the user, if present (still logging the "message" member).
The failure we'd currently get by simply skipping the override:
1) app.test GET decent error if domain is incorrect:
+ expected - actual
+Sorry, we can't find CartoDB user 'vizzualinot'. Please check that you have entered the correct domain.
-missing vizzualinot's database_name in redis (try CARTODB/script/restore_redis)
Another idea (probably simpler) would be to only override the error message IFF environment != "development"