Skip to content

SQL error when matching vlan attribute with string #1007

@garberg

Description

@garberg

Trying to match the prefix VLAN attribute to a string leads to an SQL error being shown to the user:

$ nipap a l vlan=foo
Searching for prefixes in any VRF...
Command failed: invalid input syntax for integer: "foo"
LINE 97:                         WHERE  inp.vlan = 'foo' 
                                                   ^

We should probably implement a "catch-all" try-catch clause which catches all SQL errors and returns a more user-friendly error message.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions