respond.js
function sendStringError(res, error, code, internalCode) {
	var obj = { success: false };
	obj[res ? 'description' : 'reason'] = error;
	return sendError(res, obj, code, internalCode);
}
function sendStringError(res, error, code, internalCode) {
	var obj = { success: false };
	obj[res ? 'description' : 'reason'] = error;
	return sendError(res, obj, code, internalCode);
}
function sendStringError ( res , error , code , internalCode ) { var obj = { success : false } ; obj [ res ? 'description' : 'reason' ] = error ; return sendError ( res , obj , code , internalCode ) ; }
Sends a string error to the user. Attempts to localize it.
@param res Optional Express Response object.
@param error The error to send to the user. If it's a string, it will be localized.
@param code The HTTP Status code to send (like 404, 403, etc).
@param internalCode An optional internal code to also send to the client. This is useful for programmatic use of the API so we can do non-string-based comparisons.
Sends a string error to the user . Attempts to localize it .