You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2022-11-23 11:43:41 source=engine:app google_trace_id=none logger=django.request Internal Server Error: /api/internal/v1/custom_buttons/KBL9C1T8P8EHK
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/rest_framework/viewsets.py", line 125, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/usr/local/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/rest_framework/mixins.py", line 67, in update
serializer.is_valid(raise_exception=True)
File "/usr/local/lib/python3.9/site-packages/rest_framework/serializers.py", line 220, in is_valid
self._validated_data = self.run_validation(self.initial_data)
File "/usr/local/lib/python3.9/site-packages/rest_framework/serializers.py", line 419, in run_validation
value = self.to_internal_value(data)
File "/usr/local/lib/python3.9/site-packages/rest_framework/serializers.py", line 478, in to_internal_value
validated_value = validate_method(validated_value)
File "/etc/app/apps/api/serializers/custom_button.py", line 61, in validate_data
rendered = template.render(
File "/usr/local/lib/python3.9/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/usr/local/lib/python3.9/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "<template>", line 18, in top-level template code
File "/usr/local/lib/python3.9/site-packages/jinja2/sandbox.py", line 326, in getattr
value = getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'str object' has no attribute 'creator'
Previously, it works on Grafana OnCall before v1.1.0, I only got the error after updating to v1.1.0.
Here is the result from previous working outgoing webhook:
The webhook that already saved before the v1.1.0 update still works, so it most likely an error when trying to validate the pre-rendered json.
The text was updated successfully, but these errors were encountered:
Ideally the UI should have a place to provide content for the alert payload and then we could preview and do more useful validation.
In the short term validation can be relaxed and if an error occurs during rendering the error will be passed along as the result. This is being worked on here: #884
I got 500 error when saving outgoing webhooks with this data
And this is the error log from Grafana OnCall:
Previously, it works on Grafana OnCall before v1.1.0, I only got the error after updating to v1.1.0.
Here is the result from previous working outgoing webhook:
The webhook that already saved before the v1.1.0 update still works, so it most likely an error when trying to validate the pre-rendered json.
The text was updated successfully, but these errors were encountered: