diff --git a/src/app/modules/polyglot/member_bank_deposit/services/member_bank_deposit.service.ts b/src/app/modules/polyglot/member_bank_deposit/services/member_bank_deposit.service.ts index eb7e119..a6f50f6 100644 --- a/src/app/modules/polyglot/member_bank_deposit/services/member_bank_deposit.service.ts +++ b/src/app/modules/polyglot/member_bank_deposit/services/member_bank_deposit.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { NatsService } from 'app/core/nats/services/nats.service'; import * as nats from 'nats.ws'; -import { Error } from 'app/modules/proto/protobuf/rpc_pb'; +import { Error, InvalidParamsDetail } from 'app/modules/proto/protobuf/rpc_pb'; import { ListMemberBankDepositsRequest, @@ -152,7 +152,22 @@ export class MemberBankDepositService { return resolve(result); }) .catch((e: Error) => { - console.log('failed', e); + const code = e.getCode(); + const message = e.getMessage(); + let data; + if (code == -32602) { + data = InvalidParamsDetail.deserializeBinary(e.getData_asU8()); + } else { + data = e.getData(); + } + console.log( + 'failed code:', + code, + ' message:', + message, + ' data:', + data + ); return reject(e); }); }