Change NewError return type from error to *Error