Bug #4394

[Workbench] Make duplicate name error message more user-friendly

Added by Anonymous over 4 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
Workbench
Target version:
Start date:
11/03/2014
Due date:
% Done:

0%

Estimated time:
Story points:
0.5

Description

When I tried to use the same collection name twice, the error message (the uniqueness constraint violation exception from our PostgreSQL driver, rendered by X-Editable) looked like an internal error message that wasn't intended to be shown to an end user.

Proposed fix:
  1. API server should provide an error message phrased in Arvados terms, suitable for displaying to users, like errors.add :name, "must be unique within this project"
  2. Workbench should render errors like this without strange formatting -- e.g., "Error: name must be unique" instead of <ArvadosApiClient> 422 {"name", "must be unique"}

History

#1 Updated by Brett Smith over 4 years ago

  • Subject changed from Trying to name a collection a name that already exists in a project creates funny error to [Workbench] Make duplicate name error message more user-friendly
  • Category set to Workbench
  • Target version set to Bug Triage

#2 Updated by Brett Smith over 4 years ago

  • Description updated (diff)
  • Story points set to 0.5

#3 Updated by Tom Clegg over 4 years ago

  • Description updated (diff)

#4 Updated by Tom Clegg over 4 years ago

  • Target version changed from Bug Triage to Arvados Future Sprints

#5 Updated by Tom Morris almost 3 years ago

The error is a bold red:

#<PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "collection_owner_uuid_name_unique"
DETAIL: Key (owner_uuid, name)=(qr1hi-tpzed-rv6f0l8lbvdzkog, New collection (1377)) already exists.

I'm not sure why collection names need to be unique for a user in the first place, so perhaps we should just fix that and we won't need to deal with fixing the error message.

Also available in: Atom PDF