fix: Credential error message (#1738)

fixes #1737
This commit is contained in:
Peter Chen
2024-11-18 11:08:20 -05:00
committed by GitHub
parent 524d096777
commit 229ba69b5d
2 changed files with 34 additions and 9 deletions

View File

@@ -292,7 +292,7 @@ generateTestValuesForParametersTest()
ACCOUNT,
ACCOUNT2
),
"malformedRequest",
"malformedAuthorizedCredentials",
"Field 'CredentialType' is required but missing."
},
@@ -312,10 +312,31 @@ generateTestValuesForParametersTest()
ACCOUNT,
CREDENTIALTYPE
),
"malformedRequest",
"malformedAuthorizedCredentials",
"Field 'Issuer' is required but missing."
},
ParamTestCaseBundle{
"DepositPreauthAuthorizeCredentialsIncorrectIssuerType",
fmt::format(
R"({{
"deposit_preauth": {{
"owner": "{}",
"authorized_credentials": [
{{
"issuer": 123,
"credential_type": "{}"
}}
]
}}
}})",
ACCOUNT,
CREDENTIALTYPE
),
"malformedAuthorizedCredentials",
"issuer NotString"
},
ParamTestCaseBundle{
"DepositPreauthAuthorizeCredentialsIncorrectCredentialType",
fmt::format(
@@ -333,7 +354,7 @@ generateTestValuesForParametersTest()
ACCOUNT,
ACCOUNT2
),
"invalidParams",
"malformedAuthorizedCredentials",
"credential_type NotString"
},