cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

API /api/v1.0/onpremise/users is responding 200 but throws an error

elodie_lam
Dynatrace Guide
Dynatrace Guide

Hi, I'm using python scripts to call the cluster APIs.

The APIs are working fine, they are doing the expected configurations but I have a strange behavior with the last use-case.

As you can see, the API "/api/v1.0/onpremise/users" is responding 200, I can see the configuration applied but is throwing some kind of exception so the GitlabCI job is failing:

elodie_lam_4-1654011788376.png

elodie_lam_5-1654011802643.png

 

The code I'm using is the following:

elodie_lam_2-1654011632717.png

elodie_lam_3-1654011632627.png

I'm using the same mechanism for all API calls in the scripts, for the others the behavior is normal when the call is 200 there is no Error! message. Except in the case I described.

 

Could you please help me understand why?

Thank you for your help.

Elodie

 

1 REPLY 1

mark_bley
Dynatrace Pro
Dynatrace Pro

Hi @elodie_lam,

you are exiting with sys.exit(1) even though there was not error. Usually exit codes != 0 are treated as an error. The pipeline thinks something failed.

Featured Posts