can you place these into maybe `lib/errors` or similar. These definitions add a lot of cruft to index.js