Closed kiwiroy closed 4 years ago
Looks good to me. The failures seem to be because of the incompatibility with M::P::OpenAPI, which is problematic.
@mohawk2 there’s jhthorsen/mojolicious-plugin-openapi#135 and associates for build issues
@kiwiroy: The reason for croak is that I want to give the programmer instant feedback that something is wrong here. The other option would simply be to remove the "or" and let Perl tell you the same thing.
I do however see that the croak message is not very good: It should include the name of the operation you try to call.
What is the usecase for returning a promise?
This is actually what I do in my home brewed OpenAPI JavaScript client, so I guess I retract my previous comment 🙈
As per #24 this PR removes the croak in favour of returning a rejected promise.