heroku 9.0.0-beta.1 → 9.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,6 +19,7 @@ export declare namespace resolveAddon {
19
19
  }
20
20
  export declare class NotFound extends Error {
21
21
  readonly statusCode = 404;
22
+ readonly id = "not_found";
22
23
  readonly message = "Couldn't find that addon.";
23
24
  }
24
25
  export declare class AmbiguousError extends Error {
@@ -143,6 +143,7 @@ class NotFound extends Error {
143
143
  constructor() {
144
144
  super(...arguments);
145
145
  this.statusCode = 404;
146
+ this.id = 'not_found';
146
147
  this.message = 'Couldn\'t find that addon.';
147
148
  }
148
149
  }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRelease = exports.database = exports.getAddon = exports.getAttachment = exports.all = exports.arbitraryAppDB = void 0;
4
+ const api_client_1 = require("@heroku-cli/command/lib/api-client");
4
5
  const debug_1 = require("debug");
5
6
  const resolve_1 = require("../addons/resolve");
6
7
  const bastion_1 = require("./bastion");
@@ -53,7 +54,7 @@ async function matchesHelper(heroku, app, db, namespace) {
53
54
  if (error instanceof resolve_1.AmbiguousError && ((_a = error.body) === null || _a === void 0 ? void 0 : _a.id) === 'multiple_matches' && error.matches) {
54
55
  return { matches: error.matches, error };
55
56
  }
56
- if (error instanceof resolve_1.NotFound) {
57
+ if (error instanceof api_client_1.HerokuAPIError && error.http.statusCode === 404 && error.body && error.body.id === 'not_found') {
57
58
  return { matches: null, error };
58
59
  }
59
60
  throw error;