evantahler/actionhero — pull request #379 by evantahler (2014-05-10 06:05:06+00:00)
Title: allow for variable error messages

# Variable Error Messages
*This will part of the v9.0.0 release*

## Notes

- introduces `/config/errors.js` which contain builders for all client-facing error messages actionhero can generate. This allows you to customize messages like "action not found" to your clients.
- project generator updated to create this new file
- many files changed to look for their error messages from within `config.errors`
- tests updated
- some error messages (`flatFileNotFoundMessage` and `serverErrorMessage`) have been moved to `/config/errors.js`

## Misc

- `api.utils.hashMerge`/ `api.utils.isPlainObject` have been updated to check provided hashes (or nested hashes) for a special key, `_toExpand`. If this key is `false`, this object will not be expanded on merge, and copied over literally.
- the actionProcessor will now also append `connection.actionStatus` if a connection processes an action
- actionStatus can be an error string, like 'missing_params', null, `true`, or `false`
- a status of `true` mean the action ran, but there still may be a `connection.error`
- this status is mostly used for setting HTTP error codes in the web server