Project

General

Profile

Actions

Bug #22010

open

Improve error message when user tries to delete a collection by portable data hash

Added by Brett Smith about 1 month ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
API
Target version:
-
Story points:
-

Description

If you call the /collections/delete method with a portable data hash argument, you'll get this error back:

HttpError 422 when requesting https://arvados.example.com/arvados/v1/collections/UUID?alt=json returned "//railsapi.internal/arvados/v1/collections/UUID: 422 Unprocessable Entity: #<NoMethodError: undefined method `is_trashed' for #<Hash:0x00007f52d77fe550>> (req-q5slzoxkt7ar9c5zsptf)"

This is basically Rails crashing because the synthetic collection object loaded by portable data hash doesn't have delete methods. Controller or API server should validate the UUID argument, and return a more user-friendly error message if it isn't usable.

No data to display

Actions

Also available in: Atom PDF