From a1cbab30d340624d7e79f8852da8e6257e42bacc Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Fri, 29 Apr 2016 11:22:45 -0700 Subject: [PATCH] Updated Handle a server error (markdown) --- Handle-a-server-error.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Handle-a-server-error.md b/Handle-a-server-error.md index f89e68c..1552843 100644 --- a/Handle-a-server-error.md +++ b/Handle-a-server-error.md @@ -8,6 +8,6 @@ Create a new NetworkError object from [errors](https://github.com/codecombat/cod ## Details -Joyent has a [long document on proper error handling in Node](https://www.joyent.com/developers/node/design/errors), which is worth a read. In particular: functions should either handle errors synchronously or asynchronously. Be aware that functions you call may throw an exception, and are not called in a co-express wrapped function, need to be handled manually (co-express catches errors and passes them to express' next function to be handled by error middleware). +Joyent has a [long document on proper error handling in Node](https://www.joyent.com/developers/node/design/errors), which is well worth reading. In particular: functions should either handle errors synchronously or asynchronously. Be aware that functions you call may throw an exception, and are not called in a co-express wrapped function, need to be handled manually (co-express catches errors and passes them to express' next function to be handled by error middleware). Invalid input errors, such as not providing a property or parameter that is required, are returned with status code 422, Unprocessable Entity. \ No newline at end of file