1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-11-30 17:15:36 +02:00

[#4498] fixed OnAfterApiError nil error reference

This commit is contained in:
Gani Georgiev
2024-03-06 11:05:28 +02:00
parent 1eeacf0204
commit 6695aba758
2 changed files with 3 additions and 1 deletions

View File

@@ -106,7 +106,7 @@ func InitApi(app core.App) (*echo.Echo, error) {
if hookErr == nil {
if err := app.OnAfterApiError().Trigger(event); err != nil {
app.Logger().Debug("OnAfterApiError failure", slog.String("error", hookErr.Error()))
app.Logger().Debug("OnAfterApiError failure", slog.String("error", err.Error()))
}
} else {
app.Logger().Debug("OnBeforeApiError error (truly rare case, eg. client already disconnected)", slog.String("error", hookErr.Error()))