briandelmsft / STAT-Function

Azure Function for the Microsoft Sentinel Triage AssistanT (STAT)
https://aka.ms/mstat
MIT License
9 stars 1 forks source link

New Error Classes #24

Closed briandelmsft closed 1 year ago

briandelmsft commented 1 year ago

Currently all expected errors throw an exception STATError and they can either be handled in the module or left to be handled by init.py

The rest functions all throw STATError if the rest call returns an error >= 300. However some modules need to handle specific error codes, most commonly a 404 as it not a fatal error to the module, but other 3xx/4xx/5xx errors would be

We will define some additional error classes (children of STATError) which will cover other common errors where we may want easier handling such as a STATNotFound for 404.