{"action":"created","issue":{"url":"https://api.github.com/repos/vaadin/flow/issues/4113","repository_url":"https://api.github.com/repos/vaadin/flow","labels_url":"https://api.github.com/repos/vaadin/flow/issues/4113/labels{/name}","comments_url":"https://api.github.com/repos/vaadin/flow/issues/4113/comments","events_url":"https://api.github.com/repos/vaadin/flow/issues/4113/events","html_url":"https://github.com/vaadin/flow/pull/4113","id":322827235,"number":4113,"title":"Redirect on error if there's no message to show","user":{"login":"pekam","id":28533233,"avatar_url":"https://avatars3.githubusercontent.com/u/28533233?v=4","gravatar_id":"","url":"https://api.github.com/users/pekam","html_url":"https://github.com/pekam","followers_url":"https://api.github.com/users/pekam/followers","following_url":"https://api.github.com/users/pekam/following{/other_user}","gists_url":"https://api.github.com/users/pekam/gists{/gist_id}","starred_url":"https://api.github.com/users/pekam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pekam/subscriptions","organizations_url":"https://api.github.com/users/pekam/orgs","repos_url":"https://api.github.com/users/pekam/repos","events_url":"https://api.github.com/users/pekam/events{/privacy}","received_events_url":"https://api.github.com/users/pekam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"pekam","id":28533233,"avatar_url":"https://avatars3.githubusercontent.com/u/28533233?v=4","gravatar_id":"","url":"https://api.github.com/users/pekam","html_url":"https://github.com/pekam","followers_url":"https://api.github.com/users/pekam/followers","following_url":"https://api.github.com/users/pekam/following{/other_user}","gists_url":"https://api.github.com/users/pekam/gists{/gist_id}","starred_url":"https://api.github.com/users/pekam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pekam/subscriptions","organizations_url":"https://api.github.com/users/pekam/orgs","repos_url":"https://api.github.com/users/pekam/repos","events_url":"https://api.github.com/users/pekam/events{/privacy}","received_events_url":"https://api.github.com/users/pekam/received_events","type":"User","site_admin":false},"assignees":[{"login":"pekam","id":28533233,"avatar_url":"https://avatars3.githubusercontent.com/u/28533233?v=4","gravatar_id":"","url":"https://api.github.com/users/pekam","html_url":"https://github.com/pekam","followers_url":"https://api.github.com/users/pekam/followers","following_url":"https://api.github.com/users/pekam/following{/other_user}","gists_url":"https://api.github.com/users/pekam/gists{/gist_id}","starred_url":"https://api.github.com/users/pekam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pekam/subscriptions","organizations_url":"https://api.github.com/users/pekam/orgs","repos_url":"https://api.github.com/users/pekam/repos","events_url":"https://api.github.com/users/pekam/events{/privacy}","received_events_url":"https://api.github.com/users/pekam/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-05-14T13:54:47Z","updated_at":"2018-05-16T06:11:12Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/vaadin/flow/pulls/4113","html_url":"https://github.com/vaadin/flow/pull/4113","diff_url":"https://github.com/vaadin/flow/pull/4113.diff","patch_url":"https://github.com/vaadin/flow/pull/4113.patch"},"body":"When an error occurs, don't show an empty error message box if there is no\r\nmessage to show. Instead redirect immediately, (refresh if there is no\r\nredirect url provided).\r\n\r\nThere are no messages when the notification is disabled. So for example, the\r\ndefault value `sessionExpiredNotificationEnabled = false` means that by default\r\nsession expired causes a refresh.\r\n\r\nFixes #4070\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/vaadin/flow/4113)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/vaadin/flow/issues/comments/389406041","html_url":"https://github.com/vaadin/flow/pull/4113#issuecomment-389406041","issue_url":"https://api.github.com/repos/vaadin/flow/issues/4113","id":389406041,"user":{"login":"denis-anisimov","id":11425472,"avatar_url":"https://avatars0.githubusercontent.com/u/11425472?v=4","gravatar_id":"","url":"https://api.github.com/users/denis-anisimov","html_url":"https://github.com/denis-anisimov","followers_url":"https://api.github.com/users/denis-anisimov/followers","following_url":"https://api.github.com/users/denis-anisimov/following{/other_user}","gists_url":"https://api.github.com/users/denis-anisimov/gists{/gist_id}","starred_url":"https://api.github.com/users/denis-anisimov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denis-anisimov/subscriptions","organizations_url":"https://api.github.com/users/denis-anisimov/orgs","repos_url":"https://api.github.com/users/denis-anisimov/repos","events_url":"https://api.github.com/users/denis-anisimov/events{/privacy}","received_events_url":"https://api.github.com/users/denis-anisimov/received_events","type":"User","site_admin":false},"created_at":"2018-05-16T06:11:12Z","updated_at":"2018-05-16T06:11:12Z","author_association":"CONTRIBUTOR","body":"\n\n\n\nReviewed 2 of 2 files at r3.\nReview status: all files reviewed at latest revision, 1 unresolved discussion.\n\n---\n\n*[flow-client/src/main/java/com/vaadin/client/SystemErrorHandler.java, line 90 at r2](https://reviewable.io/reviews/vaadin/flow/4113#-LCY2yK1-zfkcXEdILB1:-LCbWVmB4Vv4xna7VVW1:b-5f3uig) ([raw file](https://github.com/vaadin/flow/blob/4939677706cbb99249dfcb0da0ca3c446acb65f7/flow-client/src/main/java/com/vaadin/client/SystemErrorHandler.java#L90)):*\n<details><summary><i>Previously, pekam (Pekka Maanpää) wrote…</i></summary><blockquote>\n\nI'm not sure how to do that. Are \"GWT unit tests\" somehow different from traditional unit tests?\n\nI don't know how to verify in unit tests if the redirect happens or not. Are you sure the IT test is not enough?\n</blockquote></details>\n\nGWT unit tests are executed inside client package.\nTechnically it's still  unit test. But it requires special set up.\n\nThere is already test for `WidgetUtil`:  `com.vaadin.client.GwtWidgetUtilTest`.\n\nIT test tests normally only one aspect of the functionality (only one usecase) where a lot of participants are involved. Unit test is intended to  test all possible cases for only one unit of functionality.\n\n`redirect` is  `WidgetUtil.redirect`. It's possible to check that `WidgetUtil.redirect` has made his job.\nE.g. if `url` is not `null` then  it means that `$wnd.location` gets `url` value.  You may check that this location is the same as `url` when `handleUnrecoverableError` is called with `null`s.\n\nYou may create one more class next to `com.vaadin.client.GwtWidgetUtilTest` and create new unit test. Class should extend `ClientEngineTestBase` and all its test methods should start from `test`.\nJust write a new native method to be able to check the value of `$wnd.location`. There are plenty of them in the gwt unit tests (`flow-client/src/test-gwt/java).\nDon't forget to add it to `GwtSuite` otherwise it won't be executed.\n\nBy the way should they be `null`  or may be also just empty strings ?\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io/reviews/vaadin/flow/4113)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"denis-anisimov"}}