Skip to content

Instantly share code, notes, and snippets.

@ayoung
ayoung / ApiErrors.js
Created March 10, 2012 08:06
Api Errors
var errorTypes = new Hasshu({
'internal_error': 'An internal error occured',
'some_validation_error': 'Something didn\'t validate'
});
errorTypes.forEach(function(code, message) {
var errorType = // use mapper on key