Skip to content

Commit

Permalink
Fix error parsing in getUserInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Regalijan authored Dec 13, 2024
1 parent 7d91455 commit 6985bf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/users/getUserInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exports.func = function (args) {
}

return http(httpOpt).then(function (res) {
if (res.statusCode !== 200) { throw new Error(`Failed to fetch user information: ${res.body.errors?.join(', ')}`) }
if (res.statusCode !== 200) { throw new Error(`Failed to fetch user information: ${res.body?.errors?.at(0)?.message}`) }

res.body.created = new Date(res.body.created)

Expand Down

0 comments on commit 6985bf4

Please sign in to comment.