{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/11273","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/11273/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/11273/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/11273/events","html_url":"https://github.com/nodejs/node/issues/11273","id":206642170,"number":11273,"title":"Tracking Issue: Migrate errors to internal/errors.js","user":{"login":"jasnell","id":439929,"avatar_url":"https://avatars1.githubusercontent.com/u/439929?v=3","gravatar_id":"","url":"https://api.github.com/users/jasnell","html_url":"https://github.com/jasnell","followers_url":"https://api.github.com/users/jasnell/followers","following_url":"https://api.github.com/users/jasnell/following{/other_user}","gists_url":"https://api.github.com/users/jasnell/gists{/gist_id}","starred_url":"https://api.github.com/users/jasnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasnell/subscriptions","organizations_url":"https://api.github.com/users/jasnell/orgs","repos_url":"https://api.github.com/users/jasnell/repos","events_url":"https://api.github.com/users/jasnell/events{/privacy}","received_events_url":"https://api.github.com/users/jasnell/received_events","type":"User","site_admin":false},"labels":[{"id":458724661,"url":"https://api.github.com/repos/nodejs/node/labels/errors","name":"errors","color":"ededed","default":false},{"id":202120392,"url":"https://api.github.com/repos/nodejs/node/labels/good%20first%20contribution","name":"good first contribution","color":"bfdadc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":28,"created_at":"2017-02-09T21:58:17Z","updated_at":"2017-07-06T20:51:14Z","closed_at":null,"body":"Now that https://github.com/nodejs/node/pull/11220 has landed, we need to begin the process of migrating errors in the `*/lib.js` source over to use it. A basic guide is provided [here](https://github.com/nodejs/node/blob/master/doc/guides/using-internal-errors.md).\r\n\r\nNote that moving existing errors over to this mechanism should, in general, be considered `semver-major`. \r\n\r\nPlease use the following list to track which files have been migrated over to using the new errors and provide a link back to this issue in the relevant PRs\r\n\r\nFor those looking for a Good First Contribution to Node.js, this makes an excellent starting point. Feel free to ping me as a mentor!\r\n\r\n* Internal\r\n  * cluster (No changes required here)\r\n    * [x] [child.js](https://github.com/nodejs/node/tree/master/lib/internal/cluster/child.js)\r\n    * [x] [master.js](https://github.com/nodejs/node/tree/master/lib/internal/cluster/master.js)\r\n    * [x] [round_robin_handle.js](https://github.com/nodejs/node/tree/master/lib/internal/cluster/round_robin_handle.js)\r\n    * [x] [shared_handle.js](https://github.com/nodejs/node/tree/master/lib/internal/cluster/shared_handle.js)\r\n    * [x] [utils.js](https://github.com/nodejs/node/tree/master/lib/internal/cluster/utils.js)\r\n    * [x] [worker.js](https://github.com/nodejs/node/tree/master/lib/internal/cluster/worker.js)\r\n  * process\r\n    * [ ] [next_tick.js](https://github.com/nodejs/node/tree/master/lib/internal/process/next_tick.js) - https://github.com/nodejs/node/pull/13982\r\n    * [ ] [promises.js](https://github.com/nodejs/node/tree/master/lib/internal/process/promises.js) - https://github.com/nodejs/node/pull/11294\r\n    * [x] [stdio.js](https://github.com/nodejs/node/tree/master/lib/internal/process/stdio.js) - https://github.com/nodejs/node/pull/11294\r\n    * [x] [warning.js](https://github.com/nodejs/node/tree/master/lib/internal/process/warning.js) - https://github.com/nodejs/node/pull/11294\r\n  * streams (No changes required here)\r\n    * [x] [BufferList.js](https://github.com/nodejs/node/tree/master/lib/internal/streams/BufferList.js)\r\n    * [x] [lazy_transform.js](https://github.com/nodejs/node/tree/master/lib/internal/streams/lazy_transform.js)\r\n    * [x] [legacy.js](https://github.com/nodejs/node/tree/master/lib/internal/streams/legacy.js)\r\n  * [x] [bootstrap_node.js](https://github.com/nodejs/node/tree/master/lib/internal/bootstrap_node.js) - https://github.com/nodejs/node/pull/11298\r\n  * [ ] [buffer.js](https://github.com/nodejs/node/tree/master/lib/internal/buffer.js) - https://github.com/nodejs/node/pull/11341\r\n  * [X] [child_process.js](https://github.com/nodejs/node/tree/master/lib/internal/child_process.js) - https://github.com/nodejs/node/pull/11300 + https://github.com/nodejs/node/pull/14009\r\n  * [x] [errors.js](https://github.com/nodejs/node/tree/master/lib/internal/errors.js) (No need to migrate itself)\r\n  * [x] [freelist.js](https://github.com/nodejs/node/tree/master/lib/internal/freelist.js) (No changes required here)\r\n  * [ ] [fs.js](https://github.com/nodejs/node/tree/master/lib/internal/fs.js) - https://github.com/nodejs/node/pull/11317, https://github.com/nodejs/node/pull/13829\r\n  * [x] [linkedlist.js](https://github.com/nodejs/node/tree/master/lib/internal/linkedlist.js) (No changes required here)\r\n  * [x] [module.js](https://github.com/nodejs/node/tree/master/lib/internal/module.js) (No changes required here)\r\n  * [x] [net.js](https://github.com/nodejs/node/tree/master/lib/internal/net.js) - https://github.com/nodejs/node/pull/11302\r\n  * [x] [process.js](https://github.com/nodejs/node/tree/master/lib/internal/process.js)\r\n  * [x] [readline.js](https://github.com/nodejs/node/tree/master/lib/internal/readline.js)\r\n  * [ ] [repl.js](https://github.com/nodejs/node/tree/master/lib/internal/repl.js)\r\n  * [ ] [socket_list.js](https://github.com/nodejs/node/tree/master/lib/internal/socket_list.js) - https://github.com/nodejs/node/pull/11356\r\n  * [x] [url.js](https://github.com/nodejs/node/tree/master/lib/internal/url.js) - https://github.com/nodejs/node/pull/12574\r\n  * [x] [util.js](https://github.com/nodejs/node/tree/master/lib/internal/util.js) - https://github.com/nodejs/node/pull/11301, https://github.com/nodejs/node/pull/13829\r\n  * [x] [v8_prof_polyfill.js](https://github.com/nodejs/node/tree/master/lib/internal/v8_prof_polyfill.js) (No changes required here)\r\n  * [x] [v8_prof_processor.js](https://github.com/nodejs/node/tree/master/lib/internal/v8_prof_processor.js) (No changes required here)\r\n* <del>[_debug_agent.js](https://github.com/nodejs/node/tree/master/lib/_debug_agent.js)</del> (removed in https://github.com/nodejs/node/commit/549e81bfa1)\r\n* <del>[_debugger.js](https://github.com/nodejs/node/tree/master/lib/_debugger.js) - https://github.com/nodejs/node/pull/11380</del> (File removed from master)\r\n* [x] [_http_agent.js](https://github.com/nodejs/node/tree/master/lib/_http_agent.js)\r\n* [ ] [_http_client.js](https://github.com/nodejs/node/tree/master/lib/_http_client.js)\r\n* [x] [_http_common.js](https://github.com/nodejs/node/tree/master/lib/_http_common.js)\r\n* [x] [_http_incoming.js](https://github.com/nodejs/node/tree/master/lib/_http_incoming.js)\r\n* [ ] [_http_outgoing.js](https://github.com/nodejs/node/tree/master/lib/_http_outgoing.js)\r\n* [x] [_http_server.js](https://github.com/nodejs/node/tree/master/lib/_http_server.js)\r\n* [ ] [_linklist.js](https://github.com/nodejs/node/tree/master/lib/_linklist.js)\r\n* [x] [_stream_duplex.js](https://github.com/nodejs/node/tree/master/lib/_stream_duplex.js)\r\n* [ ] [_stream_passthrough.js](https://github.com/nodejs/node/tree/master/lib/_stream_passthrough.js)\r\n* [ ] [_stream_readable.js](https://github.com/nodejs/node/tree/master/lib/_stream_readable.js)\r\n* [ ] [_stream_transform.js](https://github.com/nodejs/node/tree/master/lib/_stream_transform.js)\r\n* [x] [_stream_wrap.js](https://github.com/nodejs/node/tree/master/lib/_stream_wrap.js) - https://github.com/nodejs/node/pull/13291\r\n* [ ] [_stream_writable.js](https://github.com/nodejs/node/tree/master/lib/_stream_writable.js)\r\n* [x] [_tls_common.js](https://github.com/nodejs/node/tree/master/lib/_tls_common.js) (No changes needed here)\r\n* [x] [_tls_legacy.js](https://github.com/nodejs/node/tree/master/lib/_tls_legacy.js) (No changes needed here)\r\n* [ ] [_tls_wrap.js](https://github.com/nodejs/node/tree/master/lib/_tls_wrap.js) - https://github.com/nodejs/node/pull/13476\r\n* [x] [assert.js](https://github.com/nodejs/node/tree/master/lib/assert.js)\r\n* [ ] [async_hooks.js](https://github.com/nodejs/node/blob/master/lib/async_hooks.js)\r\n* [ ] [buffer.js](https://github.com/nodejs/node/tree/master/lib/buffer.js)  [#13976](https://github.com/nodejs/node/pull/13976)\r\n* [ ] [child_process.js](https://github.com/nodejs/node/tree/master/lib/child_process.js)\r\n* [x] [cluster.js](https://github.com/nodejs/node/tree/master/lib/cluster.js) (No changes required here)\r\n* [x] [console.js](https://github.com/nodejs/node/tree/master/lib/console.js) - https://github.com/nodejs/node/pull/11308\r\n* [x] [constants.js](https://github.com/nodejs/node/tree/master/lib/constants.js) (No changes required here)\r\n* [ ] [crypto.js](https://github.com/nodejs/node/tree/master/lib/crypto.js)\r\n* [x] [dgram.js](https://github.com/nodejs/node/tree/master/lib/dgram.js) [- #12926](https://github.com/nodejs/node/pull/12926)\r\n* [ ] [dns.js](https://github.com/nodejs/node/tree/master/lib/dns.js)\r\n* [ ] [domain.js](https://github.com/nodejs/node/tree/master/lib/domain.js)\r\n* [ ] [events.js](https://github.com/nodejs/node/tree/master/lib/events.js) - https://github.com/nodejs/node/pull/11400\r\n* [ ] [fs.js](https://github.com/nodejs/node/tree/master/lib/fs.js)\r\n* [x] [http.js](https://github.com/nodejs/node/tree/master/lib/http.js) (No changes required here)\r\n* [ ] [https.js](https://github.com/nodejs/node/tree/master/lib/https.js) - https://github.com/nodejs/node/pull/11293\r\n* [ ] [module.js](https://github.com/nodejs/node/tree/master/lib/module.js) - https://github.com/nodejs/node/pull/11565\r\n* [ ] [net.js](https://github.com/nodejs/node/tree/master/lib/net.js)\r\n* [x] [os.js](https://github.com/nodejs/node/tree/master/lib/os.js) (No changes required here)\r\n* [ ] [path.js](https://github.com/nodejs/node/tree/master/lib/path.js) - https://github.com/nodejs/node/pull/11319\r\n* [x] [process.js](https://github.com/nodejs/node/tree/master/lib/process.js) (No changes required here)\r\n* [ ] [punycode.js](https://github.com/nodejs/node/tree/master/lib/punycode.js) (may not need to do this one)\r\n* [ ] [querystring.js](https://github.com/nodejs/node/tree/master/lib/querystring.js) - https://github.com/nodejs/node/pull/11398\r\n* [x] [readline.js](https://github.com/nodejs/node/tree/master/lib/readline.js) - https://github.com/nodejs/node/pull/11390\r\n* [ ] [repl.js](https://github.com/nodejs/node/tree/master/lib/repl.js) - https://github.com/nodejs/node/pull/11347\r\n* [ ] [stream.js](https://github.com/nodejs/node/tree/master/lib/stream.js)\r\n* [ ] [string_decoder.js](https://github.com/nodejs/node/tree/master/lib/string_decoder.js) - https://github.com/nodejs/node/pull/11385\r\n* [ ] [timers.js](https://github.com/nodejs/node/tree/master/lib/timers.js) - https://github.com/nodejs/node/pull/11384\r\n* [ ] [tls.js](https://github.com/nodejs/node/tree/master/lib/tls.js) - https://github.com/nodejs/node/pull/13994\r\n* [x] [tty.js](https://github.com/nodejs/node/tree/master/lib/tty.js)\r\n* [ ] [url.js](https://github.com/nodejs/node/tree/master/lib/url.js) - https://github.com/nodejs/node/pull/11360\r\n* [x] [util.js](https://github.com/nodejs/node/tree/master/lib/util.js)\r\n* [x] [v8.js](https://github.com/nodejs/node/tree/master/lib/v8.js) (no changes required here)\r\n* [x] [vm.js](https://github.com/nodejs/node/tree/master/lib/vm.js)\r\n* [ ] [zlib.js](https://github.com/nodejs/node/tree/master/lib/zlib.js) - https://github.com/nodejs/node/pull/12697"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/313515673","html_url":"https://github.com/nodejs/node/issues/11273#issuecomment-313515673","issue_url":"https://api.github.com/repos/nodejs/node/issues/11273","id":313515673,"user":{"login":"zladuric","id":1014367,"avatar_url":"https://avatars1.githubusercontent.com/u/1014367?v=3","gravatar_id":"","url":"https://api.github.com/users/zladuric","html_url":"https://github.com/zladuric","followers_url":"https://api.github.com/users/zladuric/followers","following_url":"https://api.github.com/users/zladuric/following{/other_user}","gists_url":"https://api.github.com/users/zladuric/gists{/gist_id}","starred_url":"https://api.github.com/users/zladuric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zladuric/subscriptions","organizations_url":"https://api.github.com/users/zladuric/orgs","repos_url":"https://api.github.com/users/zladuric/repos","events_url":"https://api.github.com/users/zladuric/events{/privacy}","received_events_url":"https://api.github.com/users/zladuric/received_events","type":"User","site_admin":false},"created_at":"2017-07-06T20:51:14Z","updated_at":"2017-07-06T20:51:14Z","body":"Hey @jasnell if I were to take on one of these (specifically fs.js), what would be the steps? Looking at some PRs here, I would:\r\n\r\n  - checkout a new branch (`fs-internal-errors`?)\r\n  - make changes to `fs.js` and `internal/errors.js` (`egrep \"new (Range|Type)?Error\" ../node/lib/fs.js` - 27 errors to replace`)\r\n  - change all the `expectError` assertions in `test/parallel/test-fs-*.js` (6 occurences in 94 files on a rough count)?\r\n \r\n\r\nAnd than the rest from [https://github.com/nodejs/node/blob/master/CONTRIBUTING.md](Contributing.md), rebase and run tests."}}
{"actor":{"display_login":"zladuric"}}