exchange. isSuccess() vs exchange.isError()- whats the difference?

Not applicable

using the httpClient in Javascript I gret an Exachange object:

What is the difference between exchange.isSuccess an exchange.isError?
are they only the negative of each other?

0 3 629
3 REPLIES 3

@yuri abaev -- I believe the documentation gives more detail and context. Does this help?

@wwitman thanks,but I asked the question after having read the docs

It says:

isSuccess(): (boolean) Returns true if the send was complete and successful.

on 4XX or 5xx isSuccess() is false?

@YuriAbaev - You will get isSuccess() = True on 4xx & 5xx because connection is established and you got the response back from backend