New function has invalid certificate

I deployed a function ~12 hours ago to https://magical-fairy-4e734c.netlify.app/.netlify/functions/envBenefits, and am getting certificate errors.

In Firefox- Error code: SEC_ERROR_UNKNOWN_ISSUER

In Chrome- NET::ERR_CERT_INVALID

The Certificate Issuer is Cisco Umbrella Secondary SubCA chi-SG.

How can I resolve this? I am getting the same errors with a custom domain setup.

Hi @jamesnw

Using Firefox I see

A function does not have a different certificate to that of the site.

What I do see is

error decoding lambda response: error decoding lambda response: json: cannot unmarshal object into Go struct field .body of type string

In order to assist with custom domain issues, you will need to provide the domain in question.

Interesting. I’m still getting the same response on one device, but other devices are showing what you see. I’m assuming some cache issue.

The error you’re seeing is not showing up in the function logs- I’ll look into resolving that decoding error next.

The custom domain error is identical, I assume it will also resolve once this is resolved.

The certificate errors resolved themselves after ~24hours, on both the standard netlify domain and the custom domain.

In case people get here from error decoding lambda response: error decoding lambda response: json: cannot unmarshal object into Go struct field- the answer here was adding a JSON.stringify on the body returned in the lambda.