Can not write to base after fetching error


I am fetching some url’s to get their right URL (with www. or without www.).
When websites don’t have SSL/https, it runs in an error. I catch the error and that’s all fine.

Right after the fetch (and error handling); I want to update the database record with

await table.updateRecordAsync(, {

‘Website’ = 'error


But this line crashes with an error message:

Error: request to failed, reason: Hostname/IP does not match certificate’s altnames: Host: is not in the cert’s altnames:,,

(although I do not fetch the website again)

How can I update the table ?

Any idea?

Thanks for any support.