More verbose error message
This commit is contained in:
parent
a78d0c0a64
commit
0d0ff801fa
|
@ -151,7 +151,9 @@ describe("/oauth2", () => {
|
|||
},
|
||||
{
|
||||
status: 400,
|
||||
body: { message: "Name is not available." },
|
||||
body: {
|
||||
message: `OAuth2 config with name '${config2.name}' is already taken.`,
|
||||
},
|
||||
}
|
||||
)
|
||||
})
|
||||
|
|
|
@ -65,7 +65,10 @@ export async function update(config: OAuth2Config): Promise<OAuth2Config> {
|
|||
c => c.name === config.name && c.id !== config.id
|
||||
)
|
||||
) {
|
||||
throw new HTTPError("Name is not available.", 400)
|
||||
throw new HTTPError(
|
||||
`OAuth2 config with name '${config.name}' is already taken.`,
|
||||
400
|
||||
)
|
||||
}
|
||||
|
||||
doc.configs[config.id] = {
|
||||
|
|
Loading…
Reference in New Issue