Skip to content

Commit

Permalink
Merge pull request #54 from heroku/k80/not-found-error-fix
Browse files Browse the repository at this point in the history
fix: update not found error message in base class and tests
  • Loading branch information
k80bowman authored Dec 9, 2024
2 parents 596dbc1 + f192933 commit 06feca8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class NotFound extends Error {
constructor(addonIdentifier: string, appIdentifier?: string) {
const message = heredoc`
We can’t find a model resource called ${color.yellow(addonIdentifier)}${appIdentifier ? ` on ${color.app(appIdentifier)}` : ''}.
Run ${color.cmd(`heroku ai:models:info --app ${appIdentifier ? appIdentifier : '<value>'}`)} to see a list of model resources.
Run ${color.cmd(`heroku addons --app ${appIdentifier ? appIdentifier : '<value>'}`)} to see a list of model resources.
`
super(message)
}
Expand Down
4 changes: 2 additions & 2 deletions test/lib/base.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ describe('attempt a request using the Heroku AI client', function () {
const {message} = error as Error
expect(stripAnsi(message)).to.equal(heredoc`
We can’t find a model resource called inference-inexistent-00001.
Run heroku ai:models:info --app <value> to see a list of model resources.
Run heroku addons --app <value> to see a list of model resources.
`)
}

Expand All @@ -180,7 +180,7 @@ describe('attempt a request using the Heroku AI client', function () {
const {message} = error as Error
expect(stripAnsi(message)).to.equal(heredoc`
We can’t find a model resource called ${addon1.name} on app2.
Run heroku ai:models:info --app app2 to see a list of model resources.
Run heroku addons --app app2 to see a list of model resources.
`)
}

Expand Down

0 comments on commit 06feca8

Please sign in to comment.