probot: Warning for `error.code` is deprecated, use `error.status`
Bug Report
Current Behavior
In @octokit/rest we’re seeing a deprecation warning for error.code:
`error.code` is deprecated, use `error.status`
This is from here, in Context#config:
It’s not a super-simple fix, because change it here causes tests to fail without the tests being updated - and that causes TypeScript errors:

So we’ll have to update the types as well.
@gr2m since we’re using our own types for the OctokitError class - what’s more correct here?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 18 (7 by maintainers)
I’m still getting this on probot v9.2.20.
Looks like it’s traced to the bunyan logging lib at lib/bunyan.js#L1146
error.statusis correct, it’s a number. It used to be the status text, that is a breaking change that comes with v8, so we should update it in probot