CredentialEngine / CredentialRegistry

Repository for development of the Credential Registry
Apache License 2.0
12 stars 10 forks source link

Server error with query #705

Closed siuc-nate closed 5 months ago

siuc-nate commented 5 months ago

On both sandbox and production, the following query works:

{
    "@type": "ceasn:Competency",
    "ceasn:isPartOf": {
        "ceasn:creator": {
            "ceterms:ctid": "ce-6d0adaa3-ef92-4b1b-8bdf-608adb91d829"
        },
        "ceasn:publisher": {
            "ceterms:ctid": "ce-6d0adaa3-ef92-4b1b-8bdf-608adb91d829"
        }
    }
}

However, using arrays throughout the query returns an error:

{
    "@type": [
        "ceasn:Competency"
    ],
    "ceasn:isPartOf": [
        {
            "ceasn:creator": [
                {
                    "ceterms:ctid": "ce-6d0adaa3-ef92-4b1b-8bdf-608adb91d829"
                }
            ],
            "ceasn:publisher": [
                {
                    "ceterms:ctid": "ce-6d0adaa3-ef92-4b1b-8bdf-608adb91d829"
                }
            ]
        }
    ]
}
{
    "error": "undefined method `keys' for an instance of Array"
}

Either variation of the query should work. Using an array with the @type property doesn't seem to cause a problem, but using an array with any of the other properties (ceasn:isPartOf, ceasn:creator, ceasn:publisher), or any combination of those properties, returns the above error.

excelsior commented 5 months ago

@siuc-nate This error and a couple of the other ones reported last were fixed.

jeannekitchens commented 5 months ago

@excelsior the query below now works on production but I am getting and error message, "Error in search request: Internal Server Error" message on sandbox.

{ "@type": [ "ceasn:Competency" ], "ceasn:isPartOf": [ { "ceasn:creator": [ { "ceterms:ctid": "ce-6d0adaa3-ef92-4b1b-8bdf-608adb91d829" } ], "ceasn:publisher": [ { "ceterms:ctid": "ce-6d0adaa3-ef92-4b1b-8bdf-608adb91d829" } ] } ] }

excelsior commented 5 months ago

@jeannekitchens Fixed sandbox, too.