// WithXErrorCode adds the xErrorCode to the delete task default response
484327
func (o *DeleteTaskDefault) WithXErrorCode(xErrorCode string) *DeleteTaskDefault {
	o.XErrorCode = xErrorCode
	return o
}
33892
func WithAllowXAttrErrors() CopyDirOpt {
	xeh := func(dst, src, xattrKey string, err error) error {
		return nil
	}
	return WithXAttrErrorHandler(xeh)
}
1062976
func (c *Context) AbortWithError(code int, err error) *Error {
	c.AbortWithStatus(code)
	return c.Error(err)
}
259057
func (s *PutRecordsResultEntry) SetErrorCode(v string) *PutRecordsResultEntry {
	s.ErrorCode = &v
	return s
}
1109472
func (tr *TaskRetry) WithErrors(errors ...StateError) *TaskRetry {
	if tr.ErrorEquals == nil {
		tr.ErrorEquals = make([]StateError, 0)
	}
	tr.ErrorEquals = append(tr.ErrorEquals, errors...)
	return tr
}
560401
func (s *Workspace) SetErrorCode(v string) *Workspace {
	s.ErrorCode = &v
	return s
}
18630
func (s *PhoneNumberError) SetErrorCode(v string) *PhoneNumberError {
	s.ErrorCode = &v
	return s
}
560602
func (s *FailedScheduledUpdateGroupActionRequest) SetErrorCode(v string) *FailedScheduledUpdateGroupActionRequest {
	s.ErrorCode = &v
	return s
}
1021000
func WithErrorHandler(value fab.ErrorHandler) coptions.Opt {
	return func(p coptions.Params) {
		logger.Debugf("Checking errHandlerSetter")
		if setter, ok := p.(errHandlerSetter); ok {
			logger.Debugf("... setting error handler")
			setter.SetErrorHandler(value)
		}
	}
}
145866
func (s *ResourceError) SetErrorCode(v string) *ResourceError {
	s.ErrorCode = &v
	return s
}
598952
func (s *TaskExecutionResultDetail) SetErrorCode(v string) *TaskExecutionResultDetail {
	s.ErrorCode = &v
	return s
}
314103
func (err Error) WithCode(code int) *Error {
	err.Code = code
	if text := http.StatusText(code); text != "" {
		err.Err = text
	}
	return &err
}
973051
func ErrorCode(err error) string {
	if err == nil {
		return ""
	}

	e, ok := err.(*Error)
	if !ok {
		return EInternal
	}

	if e == nil {
		return ""
	}

	if e.Code != "" {
		return e.Code
	}

	if e.Err != nil {
		return ErrorCode(e.Err)
	}

	return EInternal
}
235669
func (s *FleetError) SetErrorCode(v string) *FleetError {
	s.ErrorCode = &v
	return s
}
514840
func (s *UnprocessedStatistics) SetErrorCode(v string) *UnprocessedStatistics {
	s.ErrorCode = &v
	return s
}
260530
func (s *PutEventsResultEntry) SetErrorCode(v string) *PutEventsResultEntry {
	s.ErrorCode = &v
	return s
}
715055
func (r *Result) withError(err error) *Result {
	r.err = err
	return r
}