dapr | failed getting app id either from the URL path or the header dapr-app-id

337 views Asked by At

I want to use a Java client to retrieve the dapr secrets. but I am getting exceptions while invoking. not sure where to set the dapr-app-id to resolve the issue. Help would be appriticated.

below is the java code I am using.

    String storeName = "local-secret-store";
    String secretName = "DB_MONGO_URI";
    DaprClient client = (new DaprClientBuilder()).build();
    Map<String, String> secret = client.getSecret(storeName, secretName).block();

Exception:

io.dapr.exceptions.DaprException: UNIMPLEMENTED: HTTP status code 404 invalid content-type: application/json headers: Metadata(:status=404,content-type=application/json,traceparent=00-b05653dd8bdddc976913e70bad7a7a85-3084603c8b1e7803-01,date=Thu, 30 Nov 2023 23:19:39 GMT,content-length=118) DATA----------------------------- {"errorCode":"ERR_DIRECT_INVOKE","message":"failed getting app id either from the URL path or the header dapr-app-id"}

0

There are 0 answers