payload: {"action":"closed","issue":{"url":"https://api.github.com/repos/googleapis/google-auth-library-nodejs/issues/643","repository_url":"https://api.github.com/repos/googleapis/google-auth-library-nodejs","labels_url":"https://api.github.com/repos/googleapis/google-auth-library-nodejs/issues/643/labels{/name}","comments_url":"https://api.github.com/repos/googleapis/google-auth-library-nodejs/issues/643/comments","events_url":"https://api.github.com/repos/googleapis/google-auth-library-nodejs/issues/643/events","html_url":"https://github.com/googleapis/google-auth-library-nodejs/issues/643","id":422029053,"node_id":"MDU6SXNzdWU0MjIwMjkwNTM=","number":643,"title":"Descriptive error message for authentication failure","user":{"login":"sio4","id":69406,"node_id":"MDQ6VXNlcjY5NDA2","avatar_url":"https://avatars0.githubusercontent.com/u/69406?v=4","gravatar_id":"","url":"https://api.github.com/users/sio4","html_url":"https://github.com/sio4","followers_url":"https://api.github.com/users/sio4/followers","following_url":"https://api.github.com/users/sio4/following{/other_user}","gists_url":"https://api.github.com/users/sio4/gists{/gist_id}","starred_url":"https://api.github.com/users/sio4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sio4/subscriptions","organizations_url":"https://api.github.com/users/sio4/orgs","repos_url":"https://api.github.com/users/sio4/repos","events_url":"https://api.github.com/users/sio4/events{/privacy}","received_events_url":"https://api.github.com/users/sio4/received_events","type":"User","site_admin":false},"labels":[{"id":582645162,"node_id":"MDU6TGFiZWw1ODI2NDUxNjI=","url":"https://api.github.com/repos/googleapis/google-auth-library-nodejs/labels/priority:%20p1","name":"priority: p1","color":"ffa03e","default":false},{"id":176254514,"node_id":"MDU6TGFiZWwxNzYyNTQ1MTQ=","url":"https://api.github.com/repos/googleapis/google-auth-library-nodejs/labels/type:%20bug","name":"type: bug","color":"db4437","default":false}],"state":"closed","locked":false,"assignee":{"login":"JustinBeckwith","id":534619,"node_id":"MDQ6VXNlcjUzNDYxOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/534619?v=4","gravatar_id":"","url":"https://api.github.com/users/JustinBeckwith","html_url":"https://github.com/JustinBeckwith","followers_url":"https://api.github.com/users/JustinBeckwith/followers","following_url":"https://api.github.com/users/JustinBeckwith/following{/other_user}","gists_url":"https://api.github.com/users/JustinBeckwith/gists{/gist_id}","starred_url":"https://api.github.com/users/JustinBeckwith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustinBeckwith/subscriptions","organizations_url":"https://api.github.com/users/JustinBeckwith/orgs","repos_url":"https://api.github.com/users/JustinBeckwith/repos","events_url":"https://api.github.com/users/JustinBeckwith/events{/privacy}","received_events_url":"https://api.github.com/users/JustinBeckwith/received_events","type":"User","site_admin":false},"assignees":[{"login":"JustinBeckwith","id":534619,"node_id":"MDQ6VXNlcjUzNDYxOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/534619?v=4","gravatar_id":"","url":"https://api.github.com/users/JustinBeckwith","html_url":"https://github.com/JustinBeckwith","followers_url":"https://api.github.com/users/JustinBeckwith/followers","following_url":"https://api.github.com/users/JustinBeckwith/following{/other_user}","gists_url":"https://api.github.com/users/JustinBeckwith/gists{/gist_id}","starred_url":"https://api.github.com/users/JustinBeckwith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustinBeckwith/subscriptions","organizations_url":"https://api.github.com/users/JustinBeckwith/orgs","repos_url":"https://api.github.com/users/JustinBeckwith/repos","events_url":"https://api.github.com/users/JustinBeckwith/events{/privacy}","received_events_url":"https://api.github.com/users/JustinBeckwith/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2019-03-18T04:09:30Z","updated_at":"2019-03-27T16:34:31Z","closed_at":"2019-03-27T16:34:31Z","author_association":"NONE","body":"Hi,\r\nI faced a exception message when I had a problem with authentication while I used this library indirectly with Firestore library, but the message was not easy to understand since the message was just *technical* but **not contextual**. So I request/suggest a fix it with more context friendly way.\r\n\r\nThe situation was, I ran a simple Firestore testing application on my GCE instance with *Application Default Credentials* but it gave me a error message like:\r\n\r\n> Unexpected error determining execution environment: Unsuccessful response status code. Request failed with status code 403\r\n\r\nAnd I found, this message was coming from\r\n\r\n```\r\nnode_modules/google-auth-library/build/src/auth/googleauth.js:\r\n    throw new Error('Unexpected error determining execution environment: ' + e.message);\r\nnode_modules/gcp-metadata/build/src/index.js:\r\n    e.message = `Unsuccessful response status code. ${e.message}`;\r\nnode_modules/gaxios/build/src/gaxios.js:\r\n    throw new common_1.GaxiosError(`Request failed with status code ...\r\n```\r\n\r\nhttps://github.com/googleapis/google-auth-library-nodejs/blob/3382506439299ae2051d31bc4e0c1f33ab55fb02/src/auth/googleauth.ts#L257-L263\r\n\r\nThis situation really *Unexpected* because of it means `metadata.google.internal` did not respond good result :-) Anyway, regardless of this specific case, the error message only having technical stuff by library side is not enough to find the cause of that problem and it makes hard to support.\r\n\r\nPlease add a additional contextual message and/or fix the message with sentence having contextual information such as: \"Unexpected error while attempting to get authentication info: ...\" or \"Could not retrieve metadata for authentication:...\".\r\n\r\n#### Environment details\r\n\r\n  - OS: CentOS 7 runs on GCE (GCE official image)\r\n  - Node.js version: 6.14.4\r\n  - npm version: \r\n  - `google-auth-library` version: 3.1.0\r\n  - `@google-cloud/firestore` version: 1.1.0\r\n\r\n#### Steps to reproduce\r\n\r\n  1. Install package and prepare sample app\r\n  2. Make network condition of response of metadata internal server is 403 or something."}}
other: {"actor":{"display_login":"JustinBeckwith"}}