We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 461a5d9 commit a255c84Copy full SHA for a255c84
packages/user/microsoft.ts
@@ -111,7 +111,12 @@ export class MicrosoftAuthenticator {
111
})
112
113
if (xstsResponse.status !== 200) {
114
- throw new Error(`Failed to authorize with xbox live, status code: ${xstsResponse.status}: ${await xstsResponse.text()}}`)
+ const errText = await xstsResponse.text()
115
+ let errObj = {} as any
116
+ try {
117
+ errObj = JSON.parse(errText)
118
+ } catch (e) {}
119
+ throw Object.assign(new Error(`Failed to authorize with xbox live, status code: ${xstsResponse.status}: ${errText}}`), errObj)
120
}
121
122
const result = await xstsResponse.json() as XBoxResponse
0 commit comments