On a 422 error on an attempt to clone an agreement, a specific error should be displayed if available

Description

Currently if you try to duplicate an agreement (i.e. /erm/sas/<agreement UUID>/clone)
and this fails with a 422 status, the user receives the error

Error: the agreement was not duplicated
Unable to duplicate the agreement. The clone endpoint could not be accessed.
Please try again.
If the problem persists contact your system administrator.

However, the 422 response may include a specific error (it may not be because "the clone endpoint could not be accessed"). Specifically in the case of trying to duplicate an agreement that would result in a duplicate agreement name, the 422 response should be:

Unable to duplicate the agreement.
Agreement was not saved. Name must be unique. An agreement with the name \"<agreement name>\" already exists.
If the problem persists contact your system administrator.

It would be good to include this error in the information to the user so they can either resolve the problem, or they can pass the appropriate information on to the relevant system administrator

relates to

Checklist

hide

TestRail: Results

Activity

Show:

Jag Goraya October 14, 2020 at 3:14 PM

For Honeysuckle

Done

Details

Components

Assignee

Reporter

Labels

Priority

Sprint

Development Team

Bienenvolk

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created September 11, 2020 at 12:52 PM
Updated October 14, 2020 at 3:14 PM
Resolved October 14, 2020 at 3:14 PM
TestRail: Cases
TestRail: Runs