Skip to content

odc-cli deletion 400 error #1373

@david-roper

Description

@david-roper

What Happened?

When attempting to delete a subject from a deployed instance you receive the following error:

python3 odc-cli subjects delete --id 'groupId$subjectId'             
Are you sure you want to delete this subject? Type DELETE to Confirm: DELETE
{
  "message": "Body cannot be empty when content-type is set to 'application/json'",
  "statusCode": 400
}

What Did You Expect?

expect to receive a status code 200 and the subject info as well as all its sessions and records to be deleted.

Operating System

macOS 15.7.7

Browser (if applicable)

No response

Steps to Reproduce

  1. navigate to /cli directory containing odc-cli tool
  2. run the command python3 odc-cli config set-url websiteUrl/api (ex: https://mouseodc.douglasneuroinformatics.ca/api)
  3. run the command python3 odc-cli auth login --username admin-username --password admin-password
  4. run the command python3 odc-cli subjects delete --id subjectid

Anything Else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions