"Something went wrong while deleting the package."

I published an NPM package in a project-level endpoint.
Now when I try to delete the release, it fails with an error:

“Something went wrong while deleting the package.”

I tried this under a user account as well as under root account.

Any ideas what is wrong?
Where should I look into for more info?
Is there a way to just print the actual errors and not these useless “somethings”?

After one hour of digging in the logs output, I think I could find the real error message.

Started DELETE "/api/v4/projects/2/packages/2" for 172.19.0.1 at 2021-07-19 13:14:26 +0000
Processing by Gitlab::RequestForgeryProtection::Controller#index as HTML
Can't verify CSRF token authenticity.
Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.0ms | Elasticsearch: 0.0ms | Allocations: 325)

So what does that mean and how it’s possible if i logged in via the UI?

Oh, nice! Very nice.
It didn’t work when I was trying to delete it from the list of packages.
But when I opened it on a separate page and pressed the Delete button there - I could finally delete it.
So it’s just another bug in UI. Ok.