mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 13:16:56 +00:00
fix: Return M_PROFILE_TOO_LARGE for oversize profiles
Profile updates that would push the profile over 64 KiB were rejected with an untyped error, producing a 500. The spec requires 400 M_PROFILE_TOO_LARGE, which ruma now provides.
This commit is contained in:
1 parent
42609eab02
commit
4d0ccd998f
2 files changed
+3
-2
No files matched your search
@@ -80,10 +80,10 @@ impl super::Service {
|
||||
.len()
|
||||
> MAX_PROFILE_LENGTH_BYTES
|
||||
{
|
||||
return Err!(
|
||||
return Err!(Request(ProfileTooLarge(
|
||||
"Profile data must not exceed {MAX_PROFILE_LENGTH_BYTES} bytes in \
|
||||
length."
|
||||
);
|
||||
)));
|
||||
}
|
||||
} else {
|
||||
return Err!(Request(BadJson("Failed to canonicalize profile.")));
|
||||
|
||||
Reference in new issue
Block a user