File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,19 @@ describe('AccountHttp', () => {
225
225
} ) ;
226
226
} ) ;
227
227
228
+ describe ( 'transactions' , ( ) => {
229
+ it ( 'should not return accounts when account does not exist' , ( ) => {
230
+ return accountRepository . getAccountInfo ( Account . generateNewAccount ( networkType ) . address ) . toPromise ( ) . then ( r => {
231
+ return Promise . reject ( 'should fail!' ) ;
232
+ } , err => {
233
+ const error = JSON . parse ( err . message ) ;
234
+ expect ( error . statusCode ) . to . be . eq ( 404 ) ;
235
+ expect ( error . errorDetails . statusMessage ) . to . be . eq ( 'Not Found' ) ;
236
+ return Promise . resolve ( ) ;
237
+ } ) ;
238
+ } ) ;
239
+ } ) ;
240
+
228
241
describe ( 'transactions' , ( ) => {
229
242
it ( 'should call transactions successfully' , ( done ) => {
230
243
accountRepository . getAccountTransactions ( publicAccount . address ) . subscribe ( ( transactions ) => {
Original file line number Diff line number Diff line change 59
59
"dependencies" : {
60
60
"bluebird" : " ^3.5.5" ,
61
61
"catbuffer" : " 0.0.6-SNAPSHOT" ,
62
- "nem2-sdk-openapi-typescript-node-client" : " 0.7.2-0.6-SNAPSHOT.201912301439 " ,
62
+ "nem2-sdk-openapi-typescript-node-client" : " 0.7.2-0.6" ,
63
63
"crypto-js" : " ^3.1.9-1" ,
64
64
"js-joda" : " ^1.6.2" ,
65
65
"js-sha256" : " ^0.9.0" ,
Original file line number Diff line number Diff line change @@ -61,7 +61,10 @@ export abstract class Http {
61
61
if ( error . response && error . response . statusCode && error . body ) {
62
62
const formattedError = {
63
63
statusCode : error . response . statusCode ,
64
- errorDetails : error . response ,
64
+ errorDetails : {
65
+ statusCode : error . response . statusCode ,
66
+ statusMessage : error . response . statusMessage ,
67
+ } ,
65
68
body : error . body ,
66
69
} ;
67
70
return new Error ( JSON . stringify ( formattedError ) ) ;
You can’t perform that action at this time.
0 commit comments