Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Ley
synapse
Commits
ec606ea9
Unverified
Commit
ec606ea9
authored
4 years ago
by
Aaron
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add correct M_BAD_JSON error code to /profile/{userId}/displayname (#8517)
Fixes #8029
parent
629a951b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/8517.bugfix
+1
-0
1 addition, 0 deletions
changelog.d/8517.bugfix
synapse/rest/client/v1/profile.py
+3
-1
3 additions, 1 deletion
synapse/rest/client/v1/profile.py
with
4 additions
and
1 deletion
changelog.d/8517.bugfix
0 → 100644
+
1
−
0
View file @
ec606ea9
Fix error code for `/profile/{userId}/displayname` to be `M_BAD_JSON`.
This diff is collapsed.
Click to expand it.
synapse/rest/client/v1/profile.py
+
3
−
1
View file @
ec606ea9
...
...
@@ -59,7 +59,9 @@ class ProfileDisplaynameRestServlet(RestServlet):
try
:
new_name
=
content
[
"
displayname
"
]
except
Exception
:
return
400
,
"
Unable to parse name
"
raise
SynapseError
(
code
=
400
,
msg
=
"
Unable to parse name
"
,
errcode
=
Codes
.
BAD_JSON
,
)
await
self
.
profile_handler
.
set_displayname
(
user
,
requester
,
new_name
,
is_admin
)
...
...
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