Skip to content

Commit 8454fb2

Browse files
committed
feat: ❇️ label endpoint as unknown if 501 is returned
1 parent 38ab234 commit 8454fb2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/utils/monitor.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ def test_endpoint(self, _endpoint, _endpoint_info):
154154

155155
if status == 200:
156156
return 'pass'
157+
elif status == 501:
158+
# label the endpoint as "unknown", if the request returns 501 NOT INPLEMENTED
159+
self.logger.debug('%s returns 501 NOT IMPLEMENTED, therefore skipped.', _endpoint)
160+
return 'unknown'
157161
else:
158162
self._uptime_msg.append(_endpoint + ': Got status (' + status + ')')
159163
return 'fail'

0 commit comments

Comments
 (0)