eclipse-edc / DataDashboard

DataDashboard
Apache License 2.0
17 stars 82 forks source link

EDC-management: "Bad Request" when creating a "contract definition" #74

Closed edwo-dev closed 1 year ago

edwo-dev commented 1 year ago

Bug Report

Describe the Bug

'Contract Definition' can not be created. 'Bad Request' error is thrown.

Expected Behavior

Contract definition is created.

Observed Behavior

Throws error message. Does not create contract definition.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to 'Contract Definitions'
  2. Click on 'Create contract definition'
  3. Insert id
  4. Select Access policy
  5. Select Contract policy
  6. Select Assets
  7. Click 'Create'
  8. See error

Context Information

Error Information

zone.js:2680 POST http://localhost:9191/api/management/v2/contractdefinitions 400 (Bad Request)

create_contract_definition_error

Detailed Description

Request:

{
    "id": "def-test-pdf_company1",
    "criteria": [
        {
            "edc:operandLeft": "asset:prop:id",
            "edc:operator": "in",
            "edc:operandRight": [
                "test-pdf_company1"
            ]
        }
    ],
    "accessPolicyId": "no-restriction-policy",
    "contractPolicyId": "no-restriction-policy"
}

Response:

{
    "servlet": "EDC-management",
    "message": "Bad Request",
    "url": "/api/management/v2/contractdefinitions",
    "status": "400"
}
ndr-brt commented 1 year ago

will be fixed by #55