feat: add forgejo_error_reporter plugin for automatic error reporting to Forgejo issues

This commit is contained in:
Agent Zero
2026-07-26 12:49:39 +02:00
parent b9d05e2198
commit c3e41906bf
16 changed files with 608 additions and 14 deletions
+15
View File
@@ -74,4 +74,19 @@ async def report_error(error: ErrorReport, request: Request) -> Response:
},
)
# If forgejo_error_reporter plugin is active, forward error
try:
from app.plugins.builtins.forgejo_error_reporter.service import report_error_to_forgejo
entry = {
"message": error.message,
"stack": error.stack,
"url": error.url,
"userAgent": error.userAgent,
"timestamp": error.timestamp,
"context": error.context,
}
await report_error_to_forgejo(entry)
except Exception:
pass # Plugin not active or error in reporting
return Response(status_code=status.HTTP_204_NO_CONTENT)