I just saw new possibility to get notifications from Omnia via ntfy.sh. but I guess you guys ignore the fact that ntfy.sh might use authentication to post.
Tried with ?auth=token
and I get Unknown API Error. curl -X POST -d test URL?auth=token
works and I use it for other services.
Ok I know what’s the problem. I think: Debug console of the browser says:
400 - Bad Request
Error:
Remote Exception: Incorrect input. {'module': 'router_notifications', 'kind': 'request', 'action': 'create', 'data': {'msg': 'If you see this message, your notification settings seem to be correct. Have a nice day! 😊', 'severity': 'test', 'immediate': True}}
Extra:
{"module": "router_notifications", "action": "create", "kind": "request", "data": {"msg": "If you see this message, your notification settings seem to be correct. Have a nice day! \ud83d\ude0a", "severity": "test", "immediate": true}}
Trace:
Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/foris_controller/message_router.py", line 91, in process_message File "/usr/lib/python3.10/site-packages/foris_controller/message_router.py", line 40, in wrapper File "/usr/lib/python3.10/site-packages/foris_controller/message_router.py", line 76, in validate File "/usr/lib/python3.10/site-packages/foris_schema/validator.py", line 282, in validate File "/usr/lib/python3.10/site-packages/jsonschema/validators.py", line 314, in validate jsonschema.exceptions.ValidationError: 'test' is not one of ['news', 'restart', 'error', 'update'] Failed validating 'enum' in schema['properties']['data']['properties']['severity']: {'enum': ['news', 'restart', 'error', 'update']} On instance['data']['severity']: 'test'
So seems like you made an enum
missing test
So its here if it’s the script used src/scripts/notifier · master · Turris / User notifications · GitLab
But I guess reforis controller is missing it somewhere in the possible enum
’s. validator…cannot find it on gitlab
EDIT:
So I guess the problem only appears when doing a test from reforis and should work normally when some other notification is triggered…EDIT2: Yup confirmed it works besides test notification even with ?auth=token