Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise Error when JSON body contains errors #110

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from

Conversation

krets
Copy link

@krets krets commented Sep 26, 2023

During my use of this library, I found many occasions wherein the server would respond with a 200 status code, but the JSON body would contain errors. This should be raised as an error for the end-user to see.

During my use of this library, found many occasions wherein the
server would respond with a 200 status code, but the JSON body
would contain errors. This should be raised as an error for the
end-user to see.
@adorton-adobe
Copy link
Contributor

Thanks for reaching out. What errors in the result JSON are you seeing specifically? Are those errors reproducible?

@krets
Copy link
Author

krets commented Oct 6, 2023

Hello and thanks for the reply.

As I first used this library, I would get a (0, 1, 0) response to the call for conn.execute_single(action, immediate=True); I find this very opaque.

I believe this was primarily related to using the wrong functional.IdentityType.*ID when trying to create a user.
There was another occasion when I was adjusting the group membership, and I didn't provide the correct details in the action object.

I added a breakpoint to catch the underlying request and found very useful details in the JSON body, and the status code in the response was 200 which doesn't log any error messages. This change was necessary for me to continue development on my user management script without always using a debugger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants