summaryrefslogtreecommitdiff
path: root/internal/federation/federatingactor.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/federation/federatingactor.go')
-rw-r--r--internal/federation/federatingactor.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/federation/federatingactor.go b/internal/federation/federatingactor.go
index d19c97c3e..83cee4b04 100644
--- a/internal/federation/federatingactor.go
+++ b/internal/federation/federatingactor.go
@@ -170,12 +170,6 @@ func (f *federatingActor) PostInboxScheme(ctx context.Context, w http.ResponseWr
//
// Post the activity to the Actor's inbox and trigger side effects.
if err := f.sideEffectActor.PostInbox(ctx, inboxID, activity); err != nil {
- // Check if a function in the federatingDB
- // has returned an explicit errWithCode for us.
- if errWithCode, ok := err.(gtserror.WithCode); ok {
- return false, errWithCode
- }
-
// Check if it's a bad request because the
// object or target props weren't populated,
// or we failed parsing activity details.
@@ -193,6 +187,12 @@ func (f *federatingActor) PostInboxScheme(ctx context.Context, w http.ResponseWr
return false, gtserror.NewErrorBadRequest(errors.New(text), text)
}
+ // Check if a function in the federatingDB
+ // has returned an explicit errWithCode for us.
+ if errWithCode, ok := err.(gtserror.WithCode); ok {
+ return false, errWithCode
+ }
+
// Default: there's been some real error.
err := gtserror.Newf("error calling sideEffectActor.PostInbox: %w", err)
return false, gtserror.NewErrorInternalError(err)