Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postman Query catalogue call no longer works #476

Open
oliverbusch opened this issue Nov 22, 2024 · 5 comments
Open

Postman Query catalogue call no longer works #476

oliverbusch opened this issue Nov 22, 2024 · 5 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@oliverbusch
Copy link

Current Behavior

The Postman POST call {{CONSUMER_MANAGEMENT_URL}}/v3/catalog/request delivers an error message

[
    {
        "message": "Unable to obtain credentials: Empty optional",
        "type": "BadGateway",
        "path": null,
        "invalidValue": null
    }
]

Expected Behavior

The provide the catalog data

Steps To Reproduce

Execute the postman Calls

{{PROVIDER_MANAGEMENT_URL}}/v3/assets
{{PROVIDER_MANAGEMENT_URL}}/v3/policydefinitions
{{PROVIDER_MANAGEMENT_URL}}/v3/contractdefinitions

and
{{CONSUMER_MANAGEMENT_URL}}/v3/catalog/request

Tested with the build from today (21.11.2024)

@oliverbusch oliverbusch added the bug Something isn't working label Nov 22, 2024
@oliverbusch
Copy link
Author

Based on the discussion I've additionally tested with the following payloads.

{
    "@context": {
        "edc": "https://w3id.org/edc/v0.0.1/ns/"
    },
    "@type": "CatalogRequest",
    "counterPartyAddress":"http://alice-controlplane:8084/api/v1/dsp",
    "protocol": "dataspace-protocol-http",
    "querySpec": {
        "offset": 0,
        "limit": 50
    }
}

and

{
    "@context": {
        "edc": "https://w3id.org/edc/v0.0.1/ns/"
    },
    "@type": "CatalogRequest",
    "counterPartyAddress":"http://alice-controlplane:8084/api/v1/dsp",
    "protocol": "dataspace-protocol-http",
    "counterPartyId": "BPNL000000000001",
    "providerId": "BPNL000000000001",
    "querySpec": {
        "offset": 0,
        "limit": 50
    }
}

but I get still the following error

[
  {
    "message": "Unable to obtain credentials: Empty optional",
    "type": "BadGateway",
    "path": null,
    "invalidValue": null
  }
]

In the data and control plans I see no error messages.

In alice sts I've found the following error message

│ Nov 25, 2024 9:15:18 AM org.glassfish.jersey.internal.Errors logErrors                                                                                                                                                              │
│ WARNING: The following warnings have been detected: WARNING: The (sub)resource method createAccount in org.eclipse.edc.api.iam.identitytrust.sts.accounts.controller.StsAccountsApiController contains empty path annotation.       │
│ WARNING: The (sub)resource method updateAccount in org.eclipse.edc.api.iam.identitytrust.sts.accounts.controller.StsAccountsApiController contains empty path annotation.

@oliverbusch
Copy link
Author

With this payload I get a result

{
  "@context": {
    "edc": "https://w3id.org/edc/v0.0.1/ns/"
  },
  "@type": "CatalogRequest",
  "counterPartyAddress": "{{PROVIDER_PROTOCOL_URL}}",
  "counterPartyId": "BPNL000000000001",
  "protocol": "dataspace-protocol-http",
  "querySpec": {
    "offset": 0,
    "limit": 50
  }
}

To fix the issue it's necessary to add the counterPartyId in the Body of the {CONSUMER_MANAGEMENT_URL}}/v3/catalog/request POST request.

@rafaelmag110
Copy link
Contributor

@oliverbusch It seems you found the problem, and yes the counterPartyId has to be added as shown in the API Spec: https://app.swaggerhub.com/apis/eclipse-tractusx-bot/tractusx-edc/0.8.0#/Catalog%20V3/requestCatalogV3.

However, the error message could indeed state that property is missing. That is an issue to be addressed in the upstream EDC Connector repository.

Since you found the solution for your issue, can this be closed?

@oliverbusch
Copy link
Author

@rafaelmag110 The bug should not be closed until the Postman collection managmeent_api_test.json working again and you can go through the whole process.

@rafaelmag110 rafaelmag110 added the good first issue Good for newcomers label Dec 10, 2024
@AndrYurk
Copy link
Contributor

Hello, I would like to investigate and fix this issue as a first contribution, please assign it to me.
Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants