We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
18.x
Mac (Apple Silcon)
3.12.1
const auth = new Auth({ apiKey: process.env.VONAGE_API_KEY, apiSecret: process.env.VONAGE_API_SECRET }) const vonage = new Vonage(auth) const numbersResp = await vonage.numbers.getOwnedNumbers() console.log('type', typeof numbersResp)
type is object
type is string
The text was updated successfully, but these errors were encountered:
I started seeing this today as well. Yesterday evening it was working fine for me and my team.
It looks like a small change was made to the Phone Numbers APIs and they now return Content-Type: application/json;charset=UTF-8 and the SDK is explicitly expecting application/json: https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/server-client/lib/client.ts#L379
Content-Type: application/json;charset=UTF-8
application/json
Sorry, something went wrong.
Yea I can confim that is what is happening. The charset is throwing off that switch statement. Working on a fix now
The fix has been released in version 3.12.2 (1.10.2 of the @vonage/server-client and @vonage/numbers)
3.12.2
1.10.2
@vonage/server-client
@vonage/numbers
pardel
dragonmantank
manchuck
No branches or pull requests
Node Version
18.x
Platform
Mac (Apple Silcon)
SDK Version
3.12.1
Code Sample
const auth = new Auth({
apiKey: process.env.VONAGE_API_KEY,
apiSecret: process.env.VONAGE_API_SECRET
})
const vonage = new Vonage(auth)
const numbersResp = await vonage.numbers.getOwnedNumbers()
console.log('type', typeof numbersResp)
Expected Behavior
type is object
Actual Behavior
type is string
The text was updated successfully, but these errors were encountered: