mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-22 09:12:05 -07:00
fix(error handling): Fixing error handling issues with recent refactor
This commit is contained in:
@@ -71,7 +71,7 @@ class Control {
|
||||
} catch (error) {
|
||||
wlogger.error('Error in control.ts/getNetworkInfo().', error)
|
||||
|
||||
return this.errorHandler(error, res)
|
||||
return _this.errorHandler(error, res)
|
||||
}
|
||||
}
|
||||
// router.get('/getMemoryInfo', (req, res, next) => {
|
||||
|
||||
@@ -14,6 +14,7 @@ const util = require('util')
|
||||
util.inspect.defaultOptions = { depth: 1 }
|
||||
|
||||
let _this
|
||||
|
||||
class Mining {
|
||||
constructor () {
|
||||
_this = this
|
||||
@@ -93,7 +94,7 @@ class Mining {
|
||||
} catch (err) {
|
||||
wlogger.error('Error in mining.ts/getMiningInfo().', err)
|
||||
|
||||
return this.errorHandler(err, res)
|
||||
return _this.errorHandler(err, res)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +130,7 @@ class Mining {
|
||||
} catch (err) {
|
||||
wlogger.error('Error in mining.ts/getNetworkHashPS().', err)
|
||||
|
||||
return this.errorHandler(err, res)
|
||||
return _this.errorHandler(err, res)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user