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
- move the ErrorResponse type to the prompt sdk
- 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
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
then, of course adjust the usages in prompt to use this updated handler function and type