mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Include name/alias of already existing (pending) contact in error
This commit is contained in:
@@ -112,11 +112,13 @@ constructor(
|
||||
return ctx.json(details)
|
||||
} catch (e: ContactExistsException) {
|
||||
ctx.status(FORBIDDEN_403)
|
||||
val details = mapOf("error" to "CONTACT_EXISTS")
|
||||
val details =
|
||||
mapOf("error" to "CONTACT_EXISTS", "remoteAuthorName" to e.remoteAuthor.name)
|
||||
return ctx.json(details)
|
||||
} catch (e: PendingContactExistsException) {
|
||||
ctx.status(FORBIDDEN_403)
|
||||
val details = mapOf("error" to "PENDING_EXISTS")
|
||||
val details =
|
||||
mapOf("error" to "PENDING_EXISTS", "pendingContactAlias" to e.pendingContact.alias)
|
||||
return ctx.json(details)
|
||||
}
|
||||
return ctx.json(pendingContact.output())
|
||||
|
||||
Reference in New Issue
Block a user