We will be sunsetting Advisor during Jan, 2026 and will instead be providing information in Snyk Security DB.

You can begin to take advantage of Snyk Security DB today for a unified, package-centric experience.

How to use the @azure/amqp-common.ErrorNameConditionMapper.ServiceUnavailableError function in @azure/amqp-common

To help you get started, we’ve selected a few @azure/amqp-common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-sdk-for-js / sdk / servicebus / service-bus / src / session / messageSession.ts View on Github external
const timer = setTimeout(() => {
        this._deliveryDispositionMap.delete(delivery.id);
        log.receiver(
          "[%s] Disposition for delivery id: %d, did not complete in %d milliseconds. " +
            "Hence rejecting the promise with timeout error",
          this._context.namespace.connectionId,
          delivery.id,
          messageDispositionTimeout
        );

        const e: AmqpError = {
          condition: ErrorNameConditionMapper.ServiceUnavailableError,
          description:
            "Operation to settle the message has timed out. The disposition of the " +
            "message may or may not be successful"
        };
        return reject(translate(e));
      }, messageDispositionTimeout);
      this._deliveryDispositionMap.set(delivery.id, {
github Azure / azure-sdk-for-js / sdk / servicebus / service-bus / src / session / messageSession.ts View on Github external
const timer = setTimeout(() => {
        this._deliveryDispositionMap.delete(delivery.id);
        log.receiver(
          "[%s] Disposition for delivery id: %d, did not complete in %d milliseconds. " +
            "Hence rejecting the promise with timeout error",
          this._context.namespace.connectionId,
          delivery.id,
          Constants.defaultOperationTimeoutInSeconds * 1000
        );

        const e: AmqpError = {
          condition: ErrorNameConditionMapper.ServiceUnavailableError,
          description:
            "Operation to settle the message has timed out. The disposition of the " +
            "message may or may not be successful"
        };
        return reject(translate(e));
      }, Constants.defaultOperationTimeoutInSeconds * 1000);
      this._deliveryDispositionMap.set(delivery.id, {
github Azure / azure-sdk-for-js / sdk / servicebus / service-bus / src / core / messageSender.ts View on Github external
const actionAfterTimeout = () => {
            removeListeners();
            const desc: string =
              `[${this._context.namespace.connectionId}] Sender "${this.name}" ` +
              `with address "${this.address}", was not able to send the message right now, due ` +
              `to operation timeout.`;
            log.error(desc);
            const e: AmqpError = {
              condition: ErrorNameConditionMapper.ServiceUnavailableError,
              description: desc
            };
            return reject(translate(e));
          };
github Azure / azure-sdk-for-js / sdk / servicebus / service-bus / src / core / messageReceiver.ts View on Github external
const timer = setTimeout(() => {
        this._deliveryDispositionMap.delete(delivery.id);

        log.receiver(
          "[%s] Disposition for delivery id: %d, did not complete in %d milliseconds. " +
            "Hence rejecting the promise with timeout error.",
          this._context.namespace.connectionId,
          delivery.id,
          Constants.defaultOperationTimeoutInSeconds * 1000
        );

        const e: AmqpError = {
          condition: ErrorNameConditionMapper.ServiceUnavailableError,
          description:
            "Operation to settle the message has timed out. The disposition of the " +
            "message may or may not be successful"
        };
        return reject(translate(e));
      }, Constants.defaultOperationTimeoutInSeconds * 1000);
      this._deliveryDispositionMap.set(delivery.id, {
github Azure / azure-sdk-for-js / sdk / servicebus / service-bus / src / core / messageReceiver.ts View on Github external
const timer = setTimeout(() => {
        this._deliveryDispositionMap.delete(delivery.id);

        log.receiver(
          "[%s] Disposition for delivery id: %d, did not complete in %d milliseconds. " +
            "Hence rejecting the promise with timeout error.",
          this._context.namespace.connectionId,
          delivery.id,
          messageDispositionTimeout
        );

        const e: AmqpError = {
          condition: ErrorNameConditionMapper.ServiceUnavailableError,
          description:
            "Operation to settle the message has timed out. The disposition of the " +
            "message may or may not be successful"
        };
        return reject(translate(e));
      }, messageDispositionTimeout);
      this._deliveryDispositionMap.set(delivery.id, {
github Azure / azure-sdk-for-js / sdk / servicebus / service-bus / src / core / messageSender.ts View on Github external
const actionAfterTimeout = () => {
            removeListeners();
            const desc: string =
              `[${this._context.namespace.connectionId}] Sender "${this.name}" ` +
              `with address "${this.address}", was not able to send the message right now, due ` +
              `to operation timeout.`;
            log.error(desc);
            const e: AmqpError = {
              condition: ErrorNameConditionMapper.ServiceUnavailableError,
              description: desc
            };
            return reject(translate(e));
          };