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

SOAP fault is returned with HTTP status code 200 #346

Open
salmipa opened this issue Dec 9, 2021 · 2 comments
Open

SOAP fault is returned with HTTP status code 200 #346

salmipa opened this issue Dec 9, 2021 · 2 comments
Labels

Comments

@salmipa
Copy link

salmipa commented Dec 9, 2021

But it should be 500. See https://www.w3.org/TR/soap12-part2/

StatusCodes

Description/Steps to reproduce

Send back a fault and see yourself.

Link to reproduction sandbox

Expected result

As specified by the specification.

Additional information

Node: win32 x64 16.13.0
[email protected]

@salmipa
Copy link
Author

salmipa commented Dec 9, 2021

Just debugged it, and noticed that I can change it to 500 by setting

statusCode: 500

but it should happen by default.

@achrinza achrinza added the bug label Dec 10, 2021
@francois-spectre
Copy link
Contributor

francois-spectre commented Jan 30, 2024

for the record, it is expected to add the statusCode in the fault declaration like this:

 {
	Fault: {
		statusCode: 401,
		faultcode: 'Client.LoginUnauthorized',
		faultstring: 'Authentication failed',
		detail: {
			ExceptionInfo: message
		}
	}
}

I struggled on it and finally found the answer in the code... it would worth adding it to the doc

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

No branches or pull requests

3 participants