OpenAPITools / OpenAPITools/openapi-generator
[REQ][Perl] Improve error/exception handling
Open
Nobody has claimed this yet.
Enhancement: Feature
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
I think error handling could be significantly improved, compared to the current usage of Carp. As well, there are some unimplemented error logic in ApiClient.mustache that should be addressed.
- Since Moo/Moose is supported, something like Throwable::Factory might fit nicely.
- If Moo/Moose is not preferred, Exception::Class would be another option.
- If Exception::Class is not preferred, a simple Error class similar to Carton::Error
- Finally, if you have a preference to return error objects instead of throwing exceptions, I believe I can make that work as well.
Describe the solution you'd like
I am fairly open to implementation, but my preference is listed in order above.
Describe alternatives you've considered
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Perl ApiClient.mustache template and inspect its current Carp usage and unimplemented error logic. Review the proposed exception and error-object alternatives, then define and implement a consistent strategy with coverage for the affected generated client behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100