Error codes on errors?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 32.7k
- Forks
- 1.4k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 5
Description
First of all, thanks for a super well made project - I love it.
I'm trying to handle any errors that sharp encounter in a graceful way, but I can't find any way to differentiate errors other than checking for substrings in the error messages, which seem brittle.
Would it be possible to add a `code` property to the errors, in the same way that node does? (`EACCES`, `ENOENT` et all)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing sharp's current error handling and Node's EACCES/ENOENT error-code conventions. Done means errors expose stable machine-readable codes so callers can distinguish failures without matching message substrings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100