message: fix: Avoid throwing an exception if needle can't connect to the mock service during polling (may fix
diff: @@ -311,7 +311,6 @@ export abstract class AbstractService extends events.EventEmitter {
  }
  private __call(options: ServiceOptions): Promise<unknown> {
  - return new Promise<void>((resolve, reject) => {
  const config: HTTPConfig = {
  method: 'GET',
  headers: {
  @@ -326,15 +325,14 @@ export abstract class AbstractService extends events.EventEmitter {
  config.agent = false;
  }
  - needle.get(
  + return needle(
  + 'get',
  `http${options.ssl ? 's' : ''}://${options.host}:${options.port}`,
  - config,
  - (err: Error | null, res) => {
  - !err && res.statusCode === 200
  - ? resolve()
  - : reject(`HTTP Error: '${JSON.stringify(err ? err : res)}'`);
  + config
  + ).then((res) => {
  + if (res.statusCode !== 200) {
  + throw new Error(`HTTP Error: '${JSON.stringify(res)}'`);
  }
  - );
  });
  }
  }
  