Closed f0o closed 1 month ago
When a validation fails, instead of logging the error it will raise an exception about missing attribute 'errors' on ValidationException
Likely culprit: https://github.com/thatmattlove/hyperglass/blob/be09dbc476fa9e35078fd6a648d6756a9c34b0b9/hyperglass/api/error_handlers.py#L51
No clue this is on a built-in directive - it should be just working. The ValidationError is already a bug in itself.
Kept everything defaults apart from adding a FRR instance in devices.yaml
[CRITICAL] 20240403 13:51:29 | hyperglass.api.error_handlers:21 | default_handler → POST /api/query 'ValidationException' object has no attribute 'errors' [CRITICAL] 20240403 13:51:29 | hyperglass.api.error_handlers:21 | default_handler → POST /api/query 'ValidationException' object has no attribute 'errors'
https://github.com/thatmattlove/hyperglass/blob/be09dbc476fa9e35078fd6a648d6756a9c34b0b9/hyperglass/api/error_handlers.py#L51 raises the exception - unclear why it's even caused since * from the directive should allow for any input.
*
v2.0.0 on Docker using the docker-compose yaml in that branch
Hello,
I've just pushed dd2ce83 which should fix this. I don't have time to do a reproduction of the issue and fully test it, though. I'll leave this issue open so you can test it out and report back.
Bug Description
When a validation fails, instead of logging the error it will raise an exception about missing attribute 'errors' on ValidationException
Likely culprit: https://github.com/thatmattlove/hyperglass/blob/be09dbc476fa9e35078fd6a648d6756a9c34b0b9/hyperglass/api/error_handlers.py#L51
Expected behavior
No clue this is on a built-in directive - it should be just working. The ValidationError is already a bug in itself.
Steps to Reproduce
Local Configurations
Kept everything defaults apart from adding a FRR instance in devices.yaml
Logs
Possible Solution
https://github.com/thatmattlove/hyperglass/blob/be09dbc476fa9e35078fd6a648d6756a9c34b0b9/hyperglass/api/error_handlers.py#L51 raises the exception - unclear why it's even caused since
*
from the directive should allow for any input.Environment
Server
v2.0.0 on Docker using the docker-compose yaml in that branch
Client
Smartphone Details (if applicable)