@@ -5,7 +5,7 @@ import * as request from 'supertest';
55import nock from 'nock' ;
66import { app as expressApp } from '../../../masterExpressApp' ;
77import { AppMode , MasterExpressConfig , TlsMode } from '../../../shared/types' ;
8- import { ApiResponseError , Environments , Wallet } from '@bitgo-beta/sdk-core' ;
8+ import { Environments , Wallet } from '@bitgo-beta/sdk-core' ;
99import { Tbtc } from '@bitgo-beta/sdk-coin-btc' ;
1010import assert from 'assert' ;
1111
@@ -745,14 +745,10 @@ describe('POST /api/:coin/wallet/:walletId/sendmany', () => {
745745 const verifyStub = sinon . stub ( Tbtc . prototype , 'verifyTransaction' ) . resolves ( true ) ;
746746
747747 // Mock enclaved express sign request to return an error
748- const signNock = nock ( enclavedExpressUrl )
749- . post ( `/api/${ coin } /multisig/sign` )
750- . replyWithError (
751- new ApiResponseError ( 'Custom API error' , 500 , {
752- error : 'Custom API error' ,
753- requestId : 'test-request-id' ,
754- } ) ,
755- ) ;
748+ const signNock = nock ( enclavedExpressUrl ) . post ( `/api/${ coin } /multisig/sign` ) . reply ( 500 , {
749+ error : 'Internal Server Error' ,
750+ details : 'Custom API error details' ,
751+ } ) ;
756752
757753 const response = await agent
758754 . post ( `/api/${ coin } /wallet/${ walletId } /sendMany` )
@@ -772,11 +768,8 @@ describe('POST /api/:coin/wallet/:walletId/sendmany', () => {
772768 response . status . should . equal ( 500 ) ;
773769 response . body . should . have . property ( 'error' ) ;
774770 response . body . should . have . property ( 'details' ) ;
775- response . body . error . should . equal ( 'BitGoApiResponseError' ) ;
776- response . body . details . should . deepEqual ( {
777- error : 'Custom API error' ,
778- requestId : 'test-request-id' ,
779- } ) ;
771+ response . body . error . should . equal ( 'Internal Server Error' ) ;
772+ response . body . details . should . deepEqual ( 'Custom API error details' ) ;
780773
781774 walletGetNock . done ( ) ;
782775 keychainGetNock . done ( ) ;
0 commit comments