Use javascript Error object when testing serverError()