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

Approve/Reject pending Rank name/level history #7

Open
dingosky opened this issue Jan 27, 2025 · 3 comments
Open

Approve/Reject pending Rank name/level history #7

dingosky opened this issue Jan 27, 2025 · 3 comments

Comments

@dingosky
Copy link
Collaborator

Attempt to either approve or reject a pending history record for Rank name or level encounters an HTTP 500 with the following error response:

  {
      "message": "Unable to process history",
      "responseCode": 500
  }
@hohonuuli
Copy link
Member

@dingosky Can you add the request you're sending? I have tests for those that pass, but I may be missing some detail.

@dingosky
Copy link
Collaborator Author

dingosky commented Jan 29, 2025

@hohonuuli

As Maint role:

curl -X 'PUT' \
  'http://localhost:8083/v1/concept/data%20file' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <MAINT_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "rankName": "realm" }'

Response:

{"name":"data file","alternateNames":[],"media":[],"linkRealizations":[],"rank":"realm","rankName":"realm","rankLevel":null,"author":"Hey, Now","aphiaId":null,"references":[],"id":89}

Check DB history for created record ID. Then, as Admin role:

curl -X 'PUT' \
  'http://localhost:8083/v1/history/approve/<HISTORY_ID>'  \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <ADMIN_TOKEN>'

Response:

{
  "message": "Unable to process history",
  "responseCode": 500
}

I verified the above via KB api processing and, independently, using the Swagger ONI docs. The above curl commands are from the Swagger ONI interface.

@hohonuuli
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants