Failed to unmarshal response body

Trying to execute this code

  const fe = new StaticSite(scope, `${name}-fe`, {
    name: `${name}-fe`,
    location: rg.location,
    skuTier: "Standard",
    skuSize: "Standard",
  new TerraformOutput(scope, `${name}-fe-output`, {
    value: `Run "az staticwebapp secrets list --name ${}" to get the token for Github deployments`,
  const dnsCnameRecord = new DnsCnameRecord(scope, `${name}-fe-dns-cname-record`, {
    name: "www",
    ttl: 300,
    record: fe.defaultHostName,

  new StaticSiteCustomDomain(scope, `${name}-fe-cutom-domain`, {
    domainName: dnsCnameRecord.fqdn,
    validationType: "cname-delegation",

Getting this error:

[2022-03-02T13:38:45.644] [ERROR] default - ╷
│ Error: creating Static Site Custom Domain: (Custom Domain Name "" / Static Site Name "xy-z-fe" / Resource Group "xy-rg"): pollingTrackerBase#updateRawBody: failed to unmarshal response body: StatusCode=0 -- Original Error: invalid character '<' looking for beginning of value

Suggestion for a solution?

Terraform v1.1.4
on linux_amd64

Hi @Shurbeski!
Which Terraform provider are you using?

Hey, found the issue

dnsCnameRecord.fqdn - . the . at the end was causing issues. once I removed it it worked . The working version was ${}.${dnsCnameRecord.zoneName} - this does not add thee . at the end