keco39
NuxtUI: "aliases startsWith is not a function" after upgrade
Been searching for a while and finally found the "solution". It seems the order in which modules are set in NuxtConfig is important for when they're loaded. I put "@nuxt/ui" as the last one in the list and now it loads correctly. Came to that idea by reading about aliases and such... So when someone would encounter the same issue, that's the answer.
2 replies
$fetch catches error, but not able to read body
This answer means it's not possible to get the error object from a $fetch request (you have to use ofetch)? I was hoping I didn't have to install another package for that... My use case is the following: there is no up-to-date package for Campaign Monitor (for Nuxt/Vue/Node) so I created a couple of API endpoints to call CM myself (like this: const response: string = await $fetch(
https://api.createsend.com/api/v3.3/subscribers/${listid}.json
, { method: "POST", body: body, headers: { Authorization: Basic ${authToken}
} });). When an error occurs, I only see "400 Bad Request" and a stacktrace but I'm missing the underlying reason (so I have to use tools like PostMan to check what the actual error is).32 replies