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

Service exceptions from Java are not properly decoded in Python client #80

Open
chris05atm opened this issue Oct 18, 2019 · 0 comments
Open

Comments

@chris05atm
Copy link

What happened?

I am using a server conjure service and on exceptions I do not see the errorType deserialized properly.

When a remote exception is throw I get back a payload like this:

  "cause": None,
  "stackTrace": [ REMOVED FROM ISSUE ],
  "errorType": {},
  "args": [],
  "errorInstanceId": "713f5344-e299-41d6-89ff-0244a9a6a8fb",
  "logMessage": "ServiceException: INVALID_ARGUMENT (Workflow:AlertMissingInfo)",
  "message": "ServiceException: INVALID_ARGUMENT (Workflow:AlertMissingInfo)",
  "parameters": [],
  "suppressed": [],
  "localizedMessage": "ServiceException: INVALID_ARGUMENT (Workflow:AlertMissingInfo)"

The errorType parameter is missing above.

My code is not able to deduce the server side errorType for conditional error handling:

if alert_response.failure_response:
        service_exception = alert_response.failure_response.service_exception
        if service_exception['errorType'] != 'Workflow:AlertMissingInfo':
            raise ValueError(f'workflow alert missing info')

Server side is using conjure.java 4.5.0. Client side is using conjure-python-client 1.7.3 build py37_0.

What did you want to happen?

I'd expect errorType to deserialize properly from a Java Conjure service.

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

No branches or pull requests

1 participant