Files
server-scripts/haven-notify/template/error.tmpl
Jose Henrique 06cf78a4a6
Some checks failed
Check scripts syntax / check-scripts-syntax (push) Successful in 3s
Haven Notify Build and Deploy / Build Haven Notify Image (push) Successful in 10m1s
Haven Notify Build and Deploy / Deploy Haven Notify (internal) (push) Failing after 11s
adding error & deploy notification
2025-08-23 20:44:32 -03:00

37 lines
917 B
Cheetah

{{/*
Error Notification Template
Variables expected:
- .caller: The caller of the error
- .message: The error message
- .critical: Boolean indicating if the error is critical
- .extra: Optional array of additional fields with .name and .value
*/}}
{
"embeds": [
{
"title": "❌ Error",
"description": "**{{.caller}}** encountered an error!",
"color": {{if .critical}}15158332{{else}}15844367{{end}},
"fields": [
{
"name": "📄 Message",
"value": "{{.message}}",
"inline": false
}
{{- if .extra}}
{{- range $index, $field := .extra}},
{
"name": "{{$field.name}}",
"value": "{{$field.value}}",
"inline": true
}
{{- end}}
{{- end}}
],
"footer": {
"text": "✨ Haven Notify ✨"
},
"timestamp": "{{formatTime .timestamp}}"
}
]
}