Skip to content

Normalize values in FieldViolation.reason #1557

@ghost

Description

We need consistent values in the FieldViolation.reason field.

For example:

As I can see from Google Ads API, developers put field-specific values like MISSING_DISPLAY_URL in the reason field.

This creates bloated frontend code where we have to check every possible variation:

if field_violation.reason === "DISPLAY_URL_MISSING"
if field_violation.reason === "SOMEOTHERFIELD_MISSING"
// ...etc...

Instead, we should standardize to something like:

if field_violation.reason === "FIELD_REQUIRED"

or maybe even like this (for field violations only)

if field_violation.reason === "REQUIRED"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions