File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ export class SharedController {
8282 const FIAT_VENUE = FIAT_VENUES . hasOwnProperty ( req . params . fiatCurrency )
8383 ? FIAT_VENUES [ req . params . fiatCurrency ]
8484 : 'COINGECKO' ;
85+ logger . info ( 'Fiat URL: ' + FIAT_RATE_API + FIAT_VENUE + '/pairs/XBT/' + req . params . fiatCurrency ) ;
8586 return axios
8687 . get ( FIAT_RATE_API + FIAT_VENUE + '/pairs/XBT/' + req . params . fiatCurrency )
8788 . then ( ( response : any ) => {
@@ -98,10 +99,12 @@ export class SharedController {
9899 }
99100 } )
100101 . catch ( err => {
101- return handleError ( err , req , res , next ) ;
102+ logger . error ( 'Fiat Error Response: ' + JSON . stringify ( err ) ) ;
103+ res . status ( 200 ) . json ( { venue : "NONE" , rate : "0" } ) ;
102104 } ) ;
103105 } catch ( error : any ) {
104- handleError ( error , req , res , next ) ;
106+ logger . error ( 'Error from Fiat Rate: ' + JSON . stringify ( error ) ) ;
107+ res . status ( 200 ) . json ( { venue : "NONE" , rate : "0" } ) ;
105108 }
106109 } ;
107110
Original file line number Diff line number Diff line change @@ -141,7 +141,6 @@ async function startServer() {
141141startServer ( ) ;
142142
143143process . on ( 'uncaughtException' , err => {
144- logger . error ( 'I M HERE' ) ;
145144 logger . error ( 'Uncaught Exception:' , err ) ;
146145 process . exit ( 1 ) ;
147146} ) ;
You can’t perform that action at this time.
0 commit comments