Skip to content
This repository was archived by the owner on Aug 26, 2022. It is now read-only.
This repository was archived by the owner on Aug 26, 2022. It is now read-only.

Update deprecated error handling #5

@brendon1555

Description

@brendon1555

Describe the bug
Change the way we are handling errors. See deprecation warning in logs below.

To Reproduce
Trigger any error (eg push to repo that doesnt exist)
ghs secrets:set -s ENV -f .env.prod -r FAKE_REPO -b

Expected behavior
No deprecation warnings.

Logs

> ghs secrets:set -s ENV -f .env.prod -r repo -b
Deprecation: [@octokit/request-error] `error.code` is deprecated, use `error.status`.
    at RequestError.get (/Users/brendonlees/.config/yarn/global/node_modules/@octokit/request-error/dist-node/index.js:29:17)
    at Object.prettyPrint [as default] (/Users/brendonlees/.config/yarn/global/node_modules/@anomalyhq/github-secrets-cli/node_modules/@oclif/errors/lib/errors/pretty-print.js:31:22)
    at Object.exports.handle (/Users/brendonlees/.config/yarn/global/node_modules/@anomalyhq/github-secrets-cli/node_modules/@oclif/errors/lib/handle.js:18:46)
    at module.exports (/Users/brendonlees/.config/yarn/global/node_modules/@anomalyhq/github-secrets-cli/node_modules/@oclif/errors/handle.js:1:49) {
  name: 'Deprecation'
}
    HttpError: Not Found
    Code: 404

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions