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

resolver API should return not found for unmatched prefixes #14

Closed
datadavev opened this issue Nov 8, 2023 · 1 comment
Closed

resolver API should return not found for unmatched prefixes #14

datadavev opened this issue Nov 8, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@datadavev
Copy link
Collaborator

datadavev commented Nov 8, 2023

info or resolve for a non-existent or longer than existing naan is returning the default info response. Should adjust to return 404 Not Found.

Example (actual naan is 59512):

curl https://arks-stg.cdlib.org/ark:595122?info
...
< HTTP/2 200
...
<
{
  "pid": "ark:595122",
  "scheme": "ark",
  "content": "595122",
  "prefix": "595122",
  "value": null,
  "suffix": "95122",
  "target": "/.info/ark:595122",
  "canonical": "ark:/595122/",
  "status_code": 302,
  "properties": {
    "what": "ark",
    "name": "Archival Resource Key"
  },
  "definition": {
    "uniq": "ark:",
    "scheme": "ark",
    "prefix": "",
    "value": "",
    "target": "/.info/{pid}",
    "canonical": "ark:/{prefix}/{value}",
    "synonym_for": null,
    "values": []
  }
}
@datadavev datadavev added the bug Something isn't working label Nov 8, 2023
@datadavev datadavev self-assigned this Nov 8, 2023
@datadavev
Copy link
Collaborator Author

Resolved.

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
None yet
Development

No branches or pull requests

1 participant