-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
SOAP faults are no longer being passed back in the error callback/promise rejection #1155
Conversation
f9d3cde
to
59c4269
Compare
Looks like there is more broken here from the original PR. Tests are failing with this minor change, and it appears err.response.data is not a string when requestStream is used from the http client. |
@wagnerch how many tests are broken? |
@jsdevel I think it's everything using requestStream, but the problem is the test head dies on the first encounter (so it never completes the tests). Oddly it is failing on a completely different test this morning, which seems unrelated because master also fails.
|
@jsdevel Apparently I had to bump the timeout to 30000 for that test, not sure what's going on there. This is what I got up to when it fails:
|
I don't really quite know the best approach for solving this problem with requestStream. But one thing worth mentioning here, which may have detected this failure earlier with that PR, is the test cases all return http status code 200 for SOAP fault testing -- not sure why? The W3C spec says they should return http status code 500, https://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383529 For example, changing status code to 500 on master:
|
59c4269
to
6d1e135
Compare
@wagnerch please update with the latest from master. i had to migrate to github actions. |
6d1e135
to
f72c42b
Compare
f72c42b
to
898c4d5
Compare
Reverted some of the failing test cases to 0.39.0, some of these were changed for the axios implementation.
I can revert the SOAP fault test case change, even thought I think it is right. That other commit passes under v0.39.0, and passes with the changes prior to these changes. |
898c4d5
to
fa64a88
Compare
Ok, figured out the issue with the 2nd client-test. Axios by default was doing JSON parsing of the responses which is apparently different behavior than requests, disabled this by overriding transformResponse in the request config. |
fa64a88
to
4ab2d26
Compare
Hi, When updating from 0.39.0 to 0.42.0 one of my tests is failing. Looks like response.statusCode is no longer set on the error. The field response.status is set instead, but still 0.42.0 is not backwards compatible with 0.39.0. |
@kasia-sztymelska statusCode was changed to status, this is caused by PR #1146. It seems there is no test coverage for statusCode. I think the only thing that will return statusCode is a WSDL parsing issue. This is basically because in 0.39 and prior request was used and statusCode came from the object response of that code, in 0.40 and later it is using axios which uses status. Edit: Actually, there was test coverage for statusCode, but it was changed. You will see that by reviewing the PR changes. |
Based on suggestion in #1146 (comment) to fix this issue with SOAP faults.