cdot65 / pan-scm-sdk

Python SDK for Palo Alto Networks Strata Cloud Manager.
https://cdot65.github.io/pan-scm-sdk/
Apache License 2.0
0 stars 1 forks source link

Error logging missing details #32

Open mrcloudmustache opened 1 week ago

mrcloudmustache commented 1 week ago

In the example I provided an invalid tag name and there are additional error details provided than what is output in the raised error.

Output error : "Your configuration is not valid. Please review the error message for more details."

Missing details: 'details': {'errorType': 'Invalid Object', 'message': [" test999.abc.com -> tag 'best-practic' is not a valid reference", ' test999.abc.com -> tag is invalid

Those additional details would be helpful to receive through the exception.

Raw output 2024-11-05 15:02:56,308 [ERROR] HTTP error occurred: 400 Client Error: Bad Request for url: https://api.strata.paloaltonetworks.com/config/objects/v1/addresses - {'_errors': [{'code': 'API_I00013', 'message': 'Your configuration is not valid. Please review the error message for more details.', 'details': {'errorType': 'Invalid Object', 'message': [" test999.abc.com -> tag 'best-practic' is not a valid reference", ' test999.abc.com -> tag is invalid'], 'errors': [{'type': 'INVALID_REFERENCE', 'message': "'best-practic' is not a valid reference", 'params': ['best-practic']}]}}], '_request_id': 'b91e251d-8f35-4c74-ab68-4b964575c02a'}

cdot65 commented 5 days ago

Thank you for capturing this, we will give logging mechanisms a new look after our current priorities of focusing on filtering