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

Endpoint /api/metadata/validate - some wrong request status codes or validation statuses #1150

Closed
pmbinapps opened this issue Jun 3, 2024 · 1 comment
Assignees
Labels
🐛 Bug Something isn't working

Comments

@pmbinapps
Copy link

pmbinapps commented Jun 3, 2024

Occurred during exploration endpoint in #876

To reproduce use endpoint url = 'https://test-sanchonet.govtool.byron.network/api/metadata/validate'
with input as for specific case:

NOT OK, TBC - response is 200, status is null but hash is not for provided json, for case: URL to other json (drep format), hash ok - expected: INCORRECT_JSONLD
Inputs:
 {
    "url": "https://github.com/mpawel79/testrepo/blob/master/PawelDrep.jsonld",
    "hash": "eebfff0e2213ff0c5331e6d9d99d47a5a825dce7053671b6ed4daae4b4e0df5e"
}
Response code: 200
{
    "status": null,
    "valid": false,
    "raw": {
        "valid": true
    }
}
--------------------

NOT OK - response not ok, status not ok, for case: valid URL to corrupted json, hash ok - expected: INCORRECT_JSONLD
Inputs:
 {
    "url": "https://raw.githubusercontent.com/mpawel79/testrepo/master/test_INVALID_JSON_FORMAT.jsonld",
    "hash": "eebfff0e2213ff0c5331e6d9d99d47a5a825dce7053671b6ed4daae4b4e0df5e"
}
Response code: 200
{
    "status": null,
    "valid": false,
    "raw": {
        "valid": true
    }
}
--------------------


NOT OK - response ok, status not given - some other error msg, for INCORRECT_HASH not resturned,  URL ok, corrupted hash to long: expected: INCORRECT_HASH
Inputs:
 {
    "url": "https://raw.githubusercontent.com/mpawel79/testrepo/master/InfoJune03.jsonld",
    "hash": "CORRUPTED_eebfff0e2213ff0c5331e6d9d99d47a5a825dce7053671b6ed4daae4b4e0df5e"
}
Response code: 400
{
    "combinator": "ReqBody'",
    "error": "Error in $.hash: mzero"
}
--------------------
@MSzalowski
Copy link
Contributor

That endpoint is not to be used by govtool. We can close that issue as not planned.

@MSzalowski MSzalowski closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants