Skip to content

Commit

Permalink
better error message for defid-rpc-error (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxingloh authored Mar 9, 2021
1 parent e2366db commit 00986ae
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/testcontainers/src/chains/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,7 @@ export abstract class DeFiDContainer {
* RPC error from container
*/
export class DeFiDRpcError extends Error {
readonly payload: any

constructor (payload: any) {
super('DeFiD RPC error from container')
this.payload = payload
constructor (error: { code: number, message: string }) {
super(`DeFiDRpcError from RPC: '${error.message}', code: ${error.code}`)
}
}

0 comments on commit 00986ae

Please sign in to comment.