briandelmsft / STAT-Function

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

Error Handling - Missing Endpoint Environment Variables #38

Closed briandelmsft closed 1 year ago

briandelmsft commented 1 year ago

If one of the API endpoint environment variables is missing, a TypeError is thrown TypeError: can only concatenate str (not "NoneType") to str

This error should be more intuitive to point at the missing environment variable

        match api:
            case 'arm':
               stat_token[tenant]['armtoken'] = cred.get_token("https://" + arm_endpoint + "/.default", tenant_id=tenant)
               TypeError: can only concatenate str (not "NoneType") to str