func IsContextError(err error) error {
	if err == context.Canceled {
		return New(Cancelled, "Operation cancelled", err)
	}

	if err.Error() == context.DeadlineExceeded.Error() {
		return New(Timeout, "Operation timeout", err)
	}

	return nil
}
// IsContextError creates an error of type Cancelled or Deadline
IsContextError creates an error of type Cancelled or Deadline
// IsContextError creates an error of type Cancelled or Deadline
func IsContextError(err error) error {
	if err == context.Canceled {
		return New(Cancelled, "Operation cancelled", err)
	}
	if err.Error() == context.DeadlineExceeded.Error() {
		return New(Timeout, "Operation timeout", err)
	}
	return nil
}
func IsContextError ( err error ) error { if err == context . Canceled { return New ( Cancelled , " " , err ) } if err . Error ( ) == context . DeadlineExceeded . Error ( ) { return New ( Timeout , " " , err ) } return nil }
IsContextError creates an error of type Cancelled or Deadline
IsContextError creates an error of type Cancelled or Deadline