-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/0.0.4.3 #41
Feature/0.0.4.3 #41
Conversation
@@ -64,7 +64,7 @@ public IResponse sendRequest(IRequest request) throws GeneralException, AuthExce | |||
client.close(); | |||
responseB.close(); | |||
System.out.println(responseString); | |||
if(!responseString.isEmpty()) { | |||
if(!responseString.isEmpty() && statusE < 500) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
y que pasa con los status 504 Gateway Timeout creo que la condciion deberia ser solo si no es igual a 200 todo lo marque como mal y ya
@@ -38,7 +38,7 @@ public IResponse sendRequest(IRequest request) | |||
int status = responseB.getStatusLine().getStatusCode(); | |||
client.close(); | |||
responseB.close(); | |||
if (!responseString.isEmpty()) { | |||
if (!responseString.isEmpty() && status < 500) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lo mismo deberia validar solamente que este bien 200 y si no marca error
@@ -61,7 +61,7 @@ public IResponse sendRequest(IRequest request) throws GeneralException, AuthExce | |||
int status = responseB.getStatusLine().getStatusCode(); | |||
client.close(); | |||
responseB.close(); | |||
if (!responseString.isEmpty()) { | |||
if (!responseString.isEmpty() && status < 500) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lo mismo deberia validar solamente que este bien 200 y si no marca error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si el status code es menor a 500 y no viene vacío el cuerpo, entonces entra a "obtener los datos del JSON". Esto ocurre cuando son 200, 400, 201 [aquí siempre se tiene un JSON ya sea con datos, o con errores]. Para el caso de 404 el cuerpo vendría vacío, y para errores 500 el texto no es un JSON por lo cual se estaría mostrando el cuerpo tal cual es y su texto acorde al código HTTP.
En la siguiente validación es donde se discrimina los status code 200 (success) de los demás que son errores.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙆♂
New: Servicios de administración de certificados
BugFix: Ahora no se tiene un exception cuando el servidor regresa un error 500, en su lugar muestra el texto asociado al HTTP status code y el texto obtenido en la respuesta.