question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

checkNameAvailability in @azure/arm-sql does not deserialise the response

See original GitHub issue
  • Package Name: @azure/arm-sql
  • Package Version: 7.0.0
  • Operating system: Windows
  • nodejs
    • version: 10.15.2
  • browser
    • name/version:
  • typescript
    • version: 3.7.4
  • Is the bug related to documentation in

Describe the bug The object returned from checkNameAvailability does not get deserialised.

To Reproduce Steps to reproduce the behavior:

  1. Call the checkNameAvailability
  2. View the returned result

Expected behavior The return value should conform to CheckNameAvailabilityResponse

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
joheredicommented, Jul 20, 2020

@d-burr can you please try using { customHeaders: { accept: "application/json" } } in the operation options and let us know if this helps working around your issue?

await client.servers.checkNameAvailability(
    { name: "testing" },
    { customHeaders: { accept: "application/json" } }
  );

This seems to be an issue with ms-rest-js not setting the Accept header and the Service responding with XML by default when the header is not set (Azure/ms-rest-js/issues/395)

0reactions
joheredicommented, Jul 27, 2020

We have released a fix for this issue with version 7.0.1, so the workaround shouldn’t be necessary after updating.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot deserialize the JSON array (e.g. [1,2,3]) into type ...
RetrieveMultipleResponse' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly. To fix this error either change the JSON to ...
Read more >
Servers - Check Name Availability - REST API (Azure SQL ...
Determines whether a resource can be created with the specified name. In this article. URI Parameters; Request Body; Responses; Examples ...
Read more >
Business in Real-Time Using Azure IoT and Cortana ...
not identified as such, is not to be taken as an expression of opinion as to whether or not they are ... Azure...
Read more >
Cannot deserialize the current json object because(e.g.{"name":"
Is not an enumerable of "Root Objects. It contains a list but isn't one. The correct way to deserialize it is: C#. var...
Read more >
21.0.0 Release Notes (March 2022) - Dremio docs
With unlimited splits enabled, Dremio doesn't recognize implicit partition columns. ... In Dremio 21.0.0, dir0 values are directory names.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found