{"action":"created","issue":{"url":"https://api.github.com/repos/ractivejs/ractive/issues/1815","labels_url":"https://api.github.com/repos/ractivejs/ractive/issues/1815/labels{/name}","comments_url":"https://api.github.com/repos/ractivejs/ractive/issues/1815/comments","events_url":"https://api.github.com/repos/ractivejs/ractive/issues/1815/events","html_url":"https://github.com/ractivejs/ractive/pull/1815","id":61615529,"number":1815,"title":"BREAKING CHANGE: change promise rejection handling behaviour (#1788)","user":{"login":"Rich-Harris","id":1162160,"avatar_url":"https://avatars.githubusercontent.com/u/1162160?v=3","gravatar_id":"","url":"https://api.github.com/users/Rich-Harris","html_url":"https://github.com/Rich-Harris","followers_url":"https://api.github.com/users/Rich-Harris/followers","following_url":"https://api.github.com/users/Rich-Harris/following{/other_user}","gists_url":"https://api.github.com/users/Rich-Harris/gists{/gist_id}","starred_url":"https://api.github.com/users/Rich-Harris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rich-Harris/subscriptions","organizations_url":"https://api.github.com/users/Rich-Harris/orgs","repos_url":"https://api.github.com/users/Rich-Harris/repos","events_url":"https://api.github.com/users/Rich-Harris/events{/privacy}","received_events_url":"https://api.github.com/users/Rich-Harris/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-14T14:06:14Z","updated_at":"2015-03-14T17:03:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ractivejs/ractive/pulls/1815","html_url":"https://github.com/ractivejs/ractive/pull/1815","diff_url":"https://github.com/ractivejs/ractive/pull/1815.diff","patch_url":"https://github.com/ractivejs/ractive/pull/1815.patch"},"body":"See #1788. With this PR, asynchronous errors that happen inside `.render()` and `.animate()` aren't dealt with by Ractive, but must be dealt with by a `.catch()` handler, regardless of `Ractive.DEBUG`.\r\n\r\nThe exception is an automatic render (i.e. where `new Ractive()` is passed an `el` property, or it's an inline component) because then there's no way for the developer to get hold of the promise. In that case, if `Ractive.DEBUG_PROMISES` is `true` (the default), a message/stack will be logged:\r\n\r\n![screen shot 2015-03-14 at 9 58 34 am](https://cloud.githubusercontent.com/assets/1162160/6651929/9b4c0d2e-ca31-11e4-8147-9f56bf39b32d.png)\r\n"},"comment":{"url":"https://api.github.com/repos/ractivejs/ractive/issues/comments/80589306","html_url":"https://github.com/ractivejs/ractive/pull/1815#issuecomment-80589306","issue_url":"https://api.github.com/repos/ractivejs/ractive/issues/1815","id":80589306,"user":{"login":"Rich-Harris","id":1162160,"avatar_url":"https://avatars.githubusercontent.com/u/1162160?v=3","gravatar_id":"","url":"https://api.github.com/users/Rich-Harris","html_url":"https://github.com/Rich-Harris","followers_url":"https://api.github.com/users/Rich-Harris/followers","following_url":"https://api.github.com/users/Rich-Harris/following{/other_user}","gists_url":"https://api.github.com/users/Rich-Harris/gists{/gist_id}","starred_url":"https://api.github.com/users/Rich-Harris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rich-Harris/subscriptions","organizations_url":"https://api.github.com/users/Rich-Harris/orgs","repos_url":"https://api.github.com/users/Rich-Harris/repos","events_url":"https://api.github.com/users/Rich-Harris/events{/privacy}","received_events_url":"https://api.github.com/users/Rich-Harris/received_events","type":"User","site_admin":false},"created_at":"2015-03-14T17:03:27Z","updated_at":"2015-03-14T17:03:27Z","body":"AFAIK it's only Chrome that logs uncaught errors (so far) - in other browsers they'll get swallowed. So if you do this in Firefox or Safari...\r\n\r\n```js\r\nractive.set( 'foo', 'somethingThatWillCauseAnErrorSomehow' );\r\n```\r\n\r\n...then in theory you'd need to add a `.catch()` handler. In practice though a) I'm *fairly* sure that anything that could cause an error inside those promise-returning methods would happen outside the promise itself, so the error wouldn't get swallowed, and b) we couldn't do anything in these situations anyway:\r\n\r\n```js\r\nractive.set( 'foo', 'somethingOkay' )\r\n  .then( throwAnError );\r\n```"}}