{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/19404","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/19404/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/19404/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/19404/events","html_url":"https://github.com/magento/magento2/issues/19404","id":384212439,"node_id":"MDU6SXNzdWUzODQyMTI0Mzk=","number":19404,"title":"When subscribing to newsletter, if email already exists, don't throw exception, but just warn without exception","user":{"login":"woutersamaey","id":71019,"node_id":"MDQ6VXNlcjcxMDE5","avatar_url":"https://avatars1.githubusercontent.com/u/71019?v=4","gravatar_id":"","url":"https://api.github.com/users/woutersamaey","html_url":"https://github.com/woutersamaey","followers_url":"https://api.github.com/users/woutersamaey/followers","following_url":"https://api.github.com/users/woutersamaey/following{/other_user}","gists_url":"https://api.github.com/users/woutersamaey/gists{/gist_id}","starred_url":"https://api.github.com/users/woutersamaey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woutersamaey/subscriptions","organizations_url":"https://api.github.com/users/woutersamaey/orgs","repos_url":"https://api.github.com/users/woutersamaey/repos","events_url":"https://api.github.com/users/woutersamaey/events{/privacy}","received_events_url":"https://api.github.com/users/woutersamaey/received_events","type":"User","site_admin":false},"labels":[{"id":955517723,"node_id":"MDU6TGFiZWw5NTU1MTc3MjM=","url":"https://api.github.com/repos/magento/magento2/labels/Component:%20Newsletter","name":"Component: Newsletter","color":"7fb703","default":false},{"id":686420665,"node_id":"MDU6TGFiZWw2ODY0MjA2NjU=","url":"https://api.github.com/repos/magento/magento2/labels/Issue:%20Clear%20Description","name":"Issue: Clear Description","color":"0e8a16","default":false},{"id":686476746,"node_id":"MDU6TGFiZWw2ODY0NzY3NDY=","url":"https://api.github.com/repos/magento/magento2/labels/Issue:%20Confirmed","name":"Issue: Confirmed","color":"0e8a16","default":false},{"id":688811200,"node_id":"MDU6TGFiZWw2ODg4MTEyMDA=","url":"https://api.github.com/repos/magento/magento2/labels/Issue:%20Format%20is%20valid","name":"Issue: Format is valid","color":"0e8a16","default":false},{"id":686477126,"node_id":"MDU6TGFiZWw2ODY0NzcxMjY=","url":"https://api.github.com/repos/magento/magento2/labels/Reproduced%20on%202.2.x","name":"Reproduced on 2.2.x","color":"e99695","default":false},{"id":686477167,"node_id":"MDU6TGFiZWw2ODY0NzcxNjc=","url":"https://api.github.com/repos/magento/magento2/labels/Reproduced%20on%202.3.x","name":"Reproduced on 2.3.x","color":"7d6ed1","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-11-26T07:57:49Z","updated_at":"2018-11-26T08:56:56Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I want to replace the line in vendor/magento/module-newsletter/Controller/Subscriber/NewAction.php\r\n```\r\nthrow new \\Magento\\Framework\\Exception\\LocalizedException(\r\n     __('This email address is already subscribed.')\r\n);\r\n```\r\nWith:\r\n```\r\n$this->messageManager->addErrorMessage(__('This email address is already subscribed.'));\r\n```\r\nReason is: By throwing an exception, it is later caught, added as error message + logged. Since this is a user error, it should not be logged. Our log files don't need these kinds of messages.\r\n\r\nChanging this 1 line solves that and only that.\r\n\r\nSo, before I make a PR and get into a discussion about this. Is it something you would agree to?\r\n\r\n\r\n### Preconditions (*)\r\nLatest Magento version\r\n\r\n### Steps to reproduce (*)\r\nTry to subscribe an email that is already subscribed. The error log receives a message, but in my view the error log should not get this.\r\n\r\n### Expected result (*)\r\nShow error, but don't log, it's a user issue, not a platform issue.\r\n\r\n### Actual result (*)\r\nError message is shown (good) + message added to log (not desired)\r\n\r\n\r\nI am willing to make a PR, but only if this reasoning is accepted / agreed on."},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/441563431","html_url":"https://github.com/magento/magento2/issues/19404#issuecomment-441563431","issue_url":"https://api.github.com/repos/magento/magento2/issues/19404","id":441563431,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTU2MzQzMQ==","user":{"login":"woutersamaey","id":71019,"node_id":"MDQ6VXNlcjcxMDE5","avatar_url":"https://avatars1.githubusercontent.com/u/71019?v=4","gravatar_id":"","url":"https://api.github.com/users/woutersamaey","html_url":"https://github.com/woutersamaey","followers_url":"https://api.github.com/users/woutersamaey/followers","following_url":"https://api.github.com/users/woutersamaey/following{/other_user}","gists_url":"https://api.github.com/users/woutersamaey/gists{/gist_id}","starred_url":"https://api.github.com/users/woutersamaey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woutersamaey/subscriptions","organizations_url":"https://api.github.com/users/woutersamaey/orgs","repos_url":"https://api.github.com/users/woutersamaey/repos","events_url":"https://api.github.com/users/woutersamaey/events{/privacy}","received_events_url":"https://api.github.com/users/woutersamaey/received_events","type":"User","site_admin":false},"created_at":"2018-11-26T08:56:56Z","updated_at":"2018-11-26T08:56:56Z","author_association":"CONTRIBUTOR","body":"@orlangur will you accept this change or not?"}}
{"actor":{"display_login":"woutersamaey"}}