File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,9 @@ const { KUBERO_SESSION_KEY = crypto.randomBytes(20).toString('hex') } = process.
3535
3636export const configure = async ( app : Express , server : Server ) => {
3737 // Load Version from File
38- process . env . npm_package_version = fs . readFileSync ( './VERSION' , 'utf8' ) ; ;
38+ process . env . npm_package_version = fs . readFileSync ( './VERSION' , 'utf8' ) ;
39+
40+ console . log ( "Kubero Version: " + process . env . npm_package_version ) ;
3941
4042 app . use ( cors ( ) )
4143 app . use ( cookieParser ( ) )
Original file line number Diff line number Diff line change @@ -64,11 +64,16 @@ export class Metrics {
6464 }
6565
6666 public async getStatus ( ) : Promise < boolean > {
67- const status = await this . prom . status ( ) ;
68- if ( status === undefined || status === null || status === false ) {
67+ try {
68+ const status = await this . prom . status ( ) ;
69+
70+ if ( status === undefined || status === null || status === false ) {
71+ return false ;
72+ } else {
73+ return true ;
74+ }
75+ } catch ( error ) {
6976 return false ;
70- } else {
71- return true ;
7277 }
7378 }
7479
You can’t perform that action at this time.
0 commit comments