This should read `res.json( err.code, { error: err.message } );`