How to continue to get response data from REST API even if http status code is not 200?
<p>I'm using retrofit 2.0.2 and okhttp3 to build my app. My server set http status code to 418 if server code has any logic error. like password doesn't match. response data is {"statuscode":500}.  500 means password doesn't match. I don't know how to read response data when okhttp3 get non-200 http status code. retrofit throw an exception when it gets 418.</p>

<p>My question is how to read Response Data even if http status code is not 200. </p>

<p>Any suggestion?</p>