Skip to content

Commit 770421c

Browse files
committed
fixes
1 parent f8e2cf0 commit 770421c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export default class BaseApp {
131131
return processResponse(responseBuffer, this.CUSTOM_APP_ERROR_DESCRIPTION)
132132
} catch (e) {
133133
// Extract status code from error
134-
const statusCode: number = (e as any).statusCode || (e as any).returnCode || 0
134+
const statusCode: number = (e as any).statusCode || (e as any).returnCode || LedgerError.UnknownTransportError
135135
const message = (e as any).message
136136

137137
// Create buffer based on whether error has a message

src/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function processResponse(responseRaw: Buffer, customErrorList?: Record<Le
6060
// Append additional error message from payload if available
6161
// Avoid duplicating the error message if payload already contains it
6262
if (payload.length > 0) {
63-
const payloadString = payload.toString('ascii')
63+
const payloadString = payload.toString('utf8')
6464
if (!payloadString.includes(errorMessage)) {
6565
errorMessage += ` : ${payloadString}`
6666
} else {

0 commit comments

Comments
 (0)