Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
ef344b10
Commit
ef344b10
authored
7 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Don't log errors propogated from send_event
parent
b8d821aa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/replication/http/send_event.py
+10
-1
10 additions, 1 deletion
synapse/replication/http/send_event.py
with
10 additions
and
1 deletion
synapse/replication/http/send_event.py
+
10
−
1
View file @
ef344b10
...
...
@@ -15,6 +15,7 @@
from
twisted.internet
import
defer
from
synapse.api.errors
import
SynapseError
,
MatrixCodeMessageException
from
synapse.events
import
FrozenEvent
from
synapse.events.snapshot
import
EventContext
from
synapse.http.servlet
import
RestServlet
,
parse_json_object_from_request
...
...
@@ -27,6 +28,7 @@ import re
logger
=
logging
.
getLogger
(
__name__
)
@defer.inlineCallbacks
def
send_event_to_master
(
client
,
host
,
port
,
requester
,
event
,
context
):
"""
Send event to be handled on the master
...
...
@@ -48,7 +50,14 @@ def send_event_to_master(client, host, port, requester, event, context):
"
requester
"
:
requester
.
serialize
(),
}
return
client
.
post_json_get_json
(
uri
,
payload
)
try
:
result
=
yield
client
.
post_json_get_json
(
uri
,
payload
)
except
MatrixCodeMessageException
as
e
:
# We convert to SynapseError as we know that it was a SynapseError
# on the master process that we should send to the client. (And
# importantly, not stack traces everywhere)
raise
SynapseError
(
e
.
code
,
e
.
msg
,
e
.
errcode
)
defer
.
returnValue
(
result
)
class
ReplicationSendEventRestServlet
(
RestServlet
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment