Skip to content

Add ErrorResponse and HandleError utility using ErrorResponse #93

Description

@JGStyle

A lot of places in the prompt core still use their own HandleError utility, alongside the in core defined ErrorReponse type.
Eventho the type is just a named string with json export property, the advantage is that the swagger generates cleanly and it is perfectly consistent with all usages.

To unify this, we should

  1. move the ErrorResponse type to the prompt sdk
  2. update the existing handlerror function in here to use this type

then, of course adjust the usages in prompt to use this updated handler function and type

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions