Fix overly-verbose errors in message details
This commit is contained in:
parent
114a9b6969
commit
4c933a1f5a
2 changed files with 5 additions and 1 deletions
|
@ -24,6 +24,8 @@
|
|||
|
||||
.module-message-detail__label {
|
||||
@include font-body-1-bold;
|
||||
|
||||
min-width: 72px;
|
||||
}
|
||||
|
||||
.module-message-detail__unix-timestamp {
|
||||
|
|
|
@ -1610,7 +1610,9 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
const promises: Array<Promise<unknown>> = [];
|
||||
|
||||
let errors: Array<CustomError>;
|
||||
if (isCustomError(result.value)) {
|
||||
if (result.value instanceof SendMessageProtoError && result.value.errors) {
|
||||
({ errors } = result.value);
|
||||
} else if (isCustomError(result.value)) {
|
||||
errors = [result.value];
|
||||
} else if (Array.isArray(result.value.errors)) {
|
||||
({ errors } = result.value);
|
||||
|
|
Loading…
Reference in a new issue