score:0

i think it's this line

host: new url(location).searchparams.get("host"),

which might return null if host not found

i recommend adding the host to env variables and use it like

host: process.env.host

Related Query

More Query from same tag