Skip to content

Fix error reporting #27

@andresgutgon

Description

@andresgutgon

What?

Now, the errors that return promptly are imprecise. Let's with an example

Image

The user made a mistake in this example of Promptl usage inside Latitude. Instead of low, they put lol. But the error is highlighting all the yaml block, and the error is super vague

We have all the right information inside Zod errors. We just need to go deeper

Image

Related code is here:
https://github.com/latitude-dev/promptl/blob/main/src/compiler/scan.ts#L311-L334

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions