Supervisory Node create endpoint does not validate unique code but returns sql constraint error

Description

We need to add unique code validation for adding supervisory nodes.

Now when user tries to create a new supervisory node using API (there is no edit/add page for Supervisory Nodes) and enters duplicated code he/she gets sql exception. Instead we need to introduce validation for code uniqueness and return human-readable validation error message.

Environment

None

Assignee

Nikodem Graczewski

Reporter

Mateusz Kwiatkowski

Story Points

2

Time tracking

12h

Components

Sprint

None

Fix versions

Priority

Critical
Configure