Viridian
Explore posts from serversLabel templates for <UInput> elements
Hey all,
I'm trying to add a <UTooltip> to one of my <UInput> elements. However, I'm not sure how to approach this. Is there a way to, for example, override the label using a template to add my own elements, or is this not possible? Is there another approach? Thanks in advance!
19 replies
Retrieve error status code and display error on page
I'm trying to get some error handling logic to work. I have this pipeline:
Which logs the following:
So it's seemingly creating the Nuxt error, but the message or status code doesn't seem to match. This is the fetch function in my page that calls this event handler:
Ideally I want to be able to know when the error was created and display a custom error message to handle it on the front-end.
This might have a pretty simple answer, but I'm not really sure how to approach this
3 replies
Unable to get logs from Event pipe in defineEventHandler
Hey y'all, interesting question.
I'm using Effect in order to build my pipelines for events that are handled by Nuxt's server, like this:
However, for some reason, trying to log errors from the event pipe does not result in anything being logged. I'm encountering a parse error during decoding and want to log what the result of parseBody is, but it's not printing anything. I'm not entirely sure why this is, because logging anywhere else but on the incoming itself seems to work fine.
2 replies
Use incoming event type in defineEventHandler
I want to run some custom logic using a function that takes the event from an event handler in a
.post.ts
file:
However, I want to use the type of the event in my function parameter so it doesn't error. What type do I use? When I hover over it, I get (parameter) event: H3Event<EventHandlerRequest>
but I can't seem to import that into my own code, and I'm also not sure if that's the type I want to be using. Is there an easier type that would work for this provided by Nuxt?
I basically just want to be able to get the event typed properly, passed into that function and then parsed with readValidatedBody
, etc.9 replies