1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

Allow parameters in UserInfo endpoint's response's content-type

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille
2024-05-29 17:12:38 +02:00
committed by Quentin Gliech
parent 206d45bb31
commit 683516bb66
2 changed files with 13 additions and 7 deletions

View File

@@ -451,9 +451,13 @@ pub enum UserInfoError {
#[error("could not decoded response content-type: {0}")]
DecodeResponseContentType(#[from] ToStrError),
/// The content-type is not valid.
#[error("invalid response content-type: {0}")]
InvalidResponseContentTypeValue(#[from] mime::FromStrError),
/// The content-type is not the one that was expected.
#[error("invalid response content-type {got:?}, expected {expected:?}")]
InvalidResponseContentType {
#[error("unexpected response content-type {got:?}, expected {expected:?}")]
UnexpectedResponseContentType {
/// The expected content-type.
expected: String,
/// The returned content-type.