Project

General

Profile

Actions

Refactor #21744

open

Improve Rails validation errors for API

Added by Lukas Zapletal over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Rails validation errors are designed in a way that they are showed next to field in the UI interface. This does not work well for API:

Validation failed: Ip does not match selected subnet (ActiveRecord::RecordInvalid)

This error message when it's not rendered on a page but in logs or hammer/API output is missing the context and data:

  • Which Subnet
  • Which NIC
  • What IP address

This is a generic issue, not just with NIC, therefore we need some generic solution to this problem.

No data to display

Actions

Also available in: Atom PDF