{"action":"created","issue":{"url":"https://api.github.com/repos/MicrosoftDocs/winrt-api/issues/428","repository_url":"https://api.github.com/repos/MicrosoftDocs/winrt-api","labels_url":"https://api.github.com/repos/MicrosoftDocs/winrt-api/issues/428/labels{/name}","comments_url":"https://api.github.com/repos/MicrosoftDocs/winrt-api/issues/428/comments","events_url":"https://api.github.com/repos/MicrosoftDocs/winrt-api/issues/428/events","html_url":"https://github.com/MicrosoftDocs/winrt-api/issues/428","id":335074531,"node_id":"MDU6SXNzdWUzMzUwNzQ1MzE=","number":428,"title":"What happens on failure","user":{"login":"psivaram","id":37389881,"node_id":"MDQ6VXNlcjM3Mzg5ODgx","avatar_url":"https://avatars1.githubusercontent.com/u/37389881?v=4","gravatar_id":"","url":"https://api.github.com/users/psivaram","html_url":"https://github.com/psivaram","followers_url":"https://api.github.com/users/psivaram/followers","following_url":"https://api.github.com/users/psivaram/following{/other_user}","gists_url":"https://api.github.com/users/psivaram/gists{/gist_id}","starred_url":"https://api.github.com/users/psivaram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psivaram/subscriptions","organizations_url":"https://api.github.com/users/psivaram/orgs","repos_url":"https://api.github.com/users/psivaram/repos","events_url":"https://api.github.com/users/psivaram/events{/privacy}","received_events_url":"https://api.github.com/users/psivaram/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"stevewhims","id":31261191,"node_id":"MDQ6VXNlcjMxMjYxMTkx","avatar_url":"https://avatars1.githubusercontent.com/u/31261191?v=4","gravatar_id":"","url":"https://api.github.com/users/stevewhims","html_url":"https://github.com/stevewhims","followers_url":"https://api.github.com/users/stevewhims/followers","following_url":"https://api.github.com/users/stevewhims/following{/other_user}","gists_url":"https://api.github.com/users/stevewhims/gists{/gist_id}","starred_url":"https://api.github.com/users/stevewhims/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevewhims/subscriptions","organizations_url":"https://api.github.com/users/stevewhims/orgs","repos_url":"https://api.github.com/users/stevewhims/repos","events_url":"https://api.github.com/users/stevewhims/events{/privacy}","received_events_url":"https://api.github.com/users/stevewhims/received_events","type":"User","site_admin":false},"assignees":[{"login":"stevewhims","id":31261191,"node_id":"MDQ6VXNlcjMxMjYxMTkx","avatar_url":"https://avatars1.githubusercontent.com/u/31261191?v=4","gravatar_id":"","url":"https://api.github.com/users/stevewhims","html_url":"https://github.com/stevewhims","followers_url":"https://api.github.com/users/stevewhims/followers","following_url":"https://api.github.com/users/stevewhims/following{/other_user}","gists_url":"https://api.github.com/users/stevewhims/gists{/gist_id}","starred_url":"https://api.github.com/users/stevewhims/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevewhims/subscriptions","organizations_url":"https://api.github.com/users/stevewhims/orgs","repos_url":"https://api.github.com/users/stevewhims/repos","events_url":"https://api.github.com/users/stevewhims/events{/privacy}","received_events_url":"https://api.github.com/users/stevewhims/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-06-23T06:40:37Z","updated_at":"2018-09-23T00:30:25Z","closed_at":"2018-09-23T00:30:25Z","author_association":"NONE","body":"All the API's return values only specify what is returned \"When the method completes successfully\". But what happens if the API fails? Do they throw an exception? Do they return null? Something else?\n\n\n\n---\n#### Document Details\n\n⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*\n\n* ID: 489416a5-171f-18d0-1233-db017d6b96f5\n* Version Independent ID: 8d09363d-5d0f-5355-3e34-4cccf497d6ab\n* Content: [WebAuthenticationCoreManager.FindAccountProviderAsync Method (Windows.Security.Authentication.Web.Core) - UWP app developer](https://docs.microsoft.com/en-us/uwp/api/windows.security.authentication.web.core.webauthenticationcoremanager.findaccountproviderasync#Windows_Security_Authentication_Web_Core_WebAuthenticationCoreManager_FindAccountProviderAsync_System_String_)\n* Content Source: [https://cpubwin.visualstudio.com/DefaultCollection/windows-uwp/_git/winrt-api-build?path=%2fwinrt-api-build%2fwindows.security.authentication.web.core.webauthenticationcoremanager.yml&version=GBlive&_a=contents](https://cpubwin.visualstudio.com/DefaultCollection/windows-uwp/_git/winrt-api-build?path=%2fwinrt-api-build%2fwindows.security.authentication.web.core.webauthenticationcoremanager.yml&version=GBlive&_a=contents)\n* Product: **windows**\n* Git Login: **wdg-dev-content**\n* Microsoft Alias: **wdg-dev-content**"},"comment":{"url":"https://api.github.com/repos/MicrosoftDocs/winrt-api/issues/comments/423782824","html_url":"https://github.com/MicrosoftDocs/winrt-api/issues/428#issuecomment-423782824","issue_url":"https://api.github.com/repos/MicrosoftDocs/winrt-api/issues/428","id":423782824,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzc4MjgyNA==","user":{"login":"stevewhims","id":31261191,"node_id":"MDQ6VXNlcjMxMjYxMTkx","avatar_url":"https://avatars1.githubusercontent.com/u/31261191?v=4","gravatar_id":"","url":"https://api.github.com/users/stevewhims","html_url":"https://github.com/stevewhims","followers_url":"https://api.github.com/users/stevewhims/followers","following_url":"https://api.github.com/users/stevewhims/following{/other_user}","gists_url":"https://api.github.com/users/stevewhims/gists{/gist_id}","starred_url":"https://api.github.com/users/stevewhims/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevewhims/subscriptions","organizations_url":"https://api.github.com/users/stevewhims/orgs","repos_url":"https://api.github.com/users/stevewhims/repos","events_url":"https://api.github.com/users/stevewhims/events{/privacy}","received_events_url":"https://api.github.com/users/stevewhims/received_events","type":"User","site_admin":false},"created_at":"2018-09-23T00:30:25Z","updated_at":"2018-09-23T00:30:25Z","author_association":"MEMBER","body":"Hi, @psivaram, thanks for raising this issue! To the best of my knowledge that language was meant to refer to whether or not the search operation found an item, and not to refer to failures in calling the API itself. A Windows Runtime API should throw an exception only when it is called incorrectly by dev code. That way, you can catch those exceptions during debug/dev time and fix your own code. Exceptions are not, in Windows Runtime APIs, for general error conditions that the app needs to protect against in production (not finding the item you're looking for is a general condition that would and should not result in an exception).\r\n\r\nIt's the normal pattern for an object returned from a search operation (synchronous or asynchronous) to be non-null if found, otherwise null.\r\n\r\nI've updated the wording in these APIs to be a bit clearer, and to talk about the success (or otherwise) of asynchronous search and retrieval operations (whether the key item was found or not) rather than the success of the method itself (which implies exceptions and error codes). I believe the topics are clearer now. My fixes should be live on Monday morning. I'll close this issue now, optimistic that I've done the right thing, but please reopen or reply if you would like.\r\n\r\nThanks!\r\n~Steve"}}
{"actor":{"display_login":"stevewhims"}}