Hacker News new | ask | show | jobs
by justatdotin 4927 days ago
with (er, result) -> you may find yourself polling both er and result.status

in practice I find I this means relatively ugly or unhelpful error messages through the first parameter are successively refined by conditionally setting helpful status and message attributes on the second

this style is kinda consistent with ajax calls on the client that may either fail, or return data containing an error.