PulpDebClient::ApiError - HTTP 500 when running katello:delete_orphaned_content

yes, i would check the content of:

journalctl -u pulpcore-api
and see if you can spot the traceback