Niyas
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
1 deletions
-
server/model/monitor.js
|
|
|
@ -131,6 +131,7 @@ class Monitor extends BeanModel { |
|
|
|
}); |
|
|
|
bean.msg = `${res.status} - ${res.statusText}` |
|
|
|
bean.ping = dayjs().valueOf() - startTime; |
|
|
|
bean.http_code = `${res.status}` |
|
|
|
|
|
|
|
// Check certificate if https is used
|
|
|
|
|
|
|
|
@ -189,9 +190,12 @@ class Monitor extends BeanModel { |
|
|
|
retries = 0; |
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
|
|
bean.msg = error.message; |
|
|
|
|
|
|
|
if (error.response) { |
|
|
|
bean.http_code = error.response.status; |
|
|
|
} |
|
|
|
|
|
|
|
// If UP come in here, it must be upside down mode
|
|
|
|
// Just reset the retries
|
|
|
|
if (this.isUpsideDown() && bean.status === UP) { |
|
|
|
|