{"action":"created","issue":{"url":"https://api.github.com/repos/restify/errors/issues/19","repository_url":"https://api.github.com/repos/restify/errors","labels_url":"https://api.github.com/repos/restify/errors/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/restify/errors/issues/19/comments","events_url":"https://api.github.com/repos/restify/errors/issues/19/events","html_url":"https://github.com/restify/errors/pull/19","id":131251110,"number":19,"title":"options constructor accepts a context object","user":{"login":"DonutEspresso","id":2381315,"avatar_url":"https://avatars.githubusercontent.com/u/2381315?v=3","gravatar_id":"","url":"https://api.github.com/users/DonutEspresso","html_url":"https://github.com/DonutEspresso","followers_url":"https://api.github.com/users/DonutEspresso/followers","following_url":"https://api.github.com/users/DonutEspresso/following{/other_user}","gists_url":"https://api.github.com/users/DonutEspresso/gists{/gist_id}","starred_url":"https://api.github.com/users/DonutEspresso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DonutEspresso/subscriptions","organizations_url":"https://api.github.com/users/DonutEspresso/orgs","repos_url":"https://api.github.com/users/DonutEspresso/repos","events_url":"https://api.github.com/users/DonutEspresso/events{/privacy}","received_events_url":"https://api.github.com/users/DonutEspresso/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-04T05:46:17Z","updated_at":"2016-02-04T21:02:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/restify/errors/pulls/19","html_url":"https://github.com/restify/errors/pull/19","diff_url":"https://github.com/restify/errors/pull/19.diff","patch_url":"https://github.com/restify/errors/pull/19.patch"},"body":"I'm finding I frequently want to add contextual properties to an object I'm creating to store some context about what might have caused that error. i.e., if an http request failed, I might want to put the url on the error object.\r\n\r\nSince we already have the options constructor, this seemed like a good place to put it. All arbitrary context properties are stored on the `context` property instead of directly on the error itself.\r\n\r\nSuggestions/feedback @yunong @micahr? "},"comment":{"url":"https://api.github.com/repos/restify/errors/issues/comments/180048377","html_url":"https://github.com/restify/errors/pull/19#issuecomment-180048377","issue_url":"https://api.github.com/repos/restify/errors/issues/19","id":180048377,"user":{"login":"DonutEspresso","id":2381315,"avatar_url":"https://avatars.githubusercontent.com/u/2381315?v=3","gravatar_id":"","url":"https://api.github.com/users/DonutEspresso","html_url":"https://github.com/DonutEspresso","followers_url":"https://api.github.com/users/DonutEspresso/followers","following_url":"https://api.github.com/users/DonutEspresso/following{/other_user}","gists_url":"https://api.github.com/users/DonutEspresso/gists{/gist_id}","starred_url":"https://api.github.com/users/DonutEspresso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DonutEspresso/subscriptions","organizations_url":"https://api.github.com/users/DonutEspresso/orgs","repos_url":"https://api.github.com/users/DonutEspresso/repos","events_url":"https://api.github.com/users/DonutEspresso/events{/privacy}","received_events_url":"https://api.github.com/users/DonutEspresso/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T21:02:53Z","updated_at":"2016-02-04T21:02:53Z","body":"Looks like we're all on board - may have to come up with some custom serializers for bunyan to support dumping of context. "}}