dapr / js-sdk

Dapr SDK for Javascript
Apache License 2.0
197 stars 82 forks source link

PATCH - invalid HTTP verb #612

Open davidfigueredo-ink opened 1 month ago

davidfigueredo-ink commented 1 month ago

Expected Behavior

I'm trying to call with a PATCH request to another microservice using the Dapr client invoke.

Actual Behavior

When I call the Dapr client invoker with the PATCH verb, it throws the following error Error: 13 INTERNAL: failed to invoke, id: my_microservice, err: rpc error: code = Internal desc = error invoking app channel: rpc error: code = InvalidArgument desc = invalid HTTP verb

Steps to Reproduce the Problem

Call the GRPCClientInvoker class invoke with a PATCH request.

Possible Solution

On the enum of verbs for the HTTP requests you have the PATCH type, but, in the HttpVerb.util.js, the PATCH is not defined on the switch cases of the two methods. I think that adding the case for that verb will be a possible solution.

Thanks in advance!