How to deal with unexpected response 500 in Android
up vote
0
down vote
favorite
I am trying to retrieve a JSON from an external API using Volley.
Here is my code
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test);
final TextView mTextView = findViewById(R.id.testreq);
RequestQueue queue = Volley.newRequestQueue(this);
String url = "https://horoscope-free-api.herokuapp.com/?time=today&sign=cancer";
StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
new Response.Listener<String>()
@Override
public void onResponse(String response)
// Display the first 500 characters of the response string.
mTextView.setText("Response is: "+ response.substring(0,500));
, new Response.ErrorListener()
@Override
public void onErrorResponse(VolleyError error)
mTextView.setText("That didn't work");
Log.d("Error", error.toString());
);
queue.add(stringRequest);
It seems like the response is done but I am getting this error
E/Volley: [277] BasicNetwork.performRequest: Unexpected response code 500
and when I ran a test on the API in https://apitester.com/ It tells me its passed and I get this error
Response Headers
HTTP/1.1 500 Internal Server Error
Connection: keep-alive
Date: Sat, 10 Nov 2018 19:56:18 GMT
Server: Apache
Transfer-Encoding: chunked
Content-Type: application/json
Via: 1.1 vegur
Any ideas how to solve this? Is it the API or is it me?
java
|
show 2 more comments
up vote
0
down vote
favorite
I am trying to retrieve a JSON from an external API using Volley.
Here is my code
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test);
final TextView mTextView = findViewById(R.id.testreq);
RequestQueue queue = Volley.newRequestQueue(this);
String url = "https://horoscope-free-api.herokuapp.com/?time=today&sign=cancer";
StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
new Response.Listener<String>()
@Override
public void onResponse(String response)
// Display the first 500 characters of the response string.
mTextView.setText("Response is: "+ response.substring(0,500));
, new Response.ErrorListener()
@Override
public void onErrorResponse(VolleyError error)
mTextView.setText("That didn't work");
Log.d("Error", error.toString());
);
queue.add(stringRequest);
It seems like the response is done but I am getting this error
E/Volley: [277] BasicNetwork.performRequest: Unexpected response code 500
and when I ran a test on the API in https://apitester.com/ It tells me its passed and I get this error
Response Headers
HTTP/1.1 500 Internal Server Error
Connection: keep-alive
Date: Sat, 10 Nov 2018 19:56:18 GMT
Server: Apache
Transfer-Encoding: chunked
Content-Type: application/json
Via: 1.1 vegur
Any ideas how to solve this? Is it the API or is it me?
java
@PushpeshKumarRajwanshi I do understand that status 500 means thats server error, and thats why I am asking if its me not handling the request properly or no. I wasnt going to ask if I didnt check my code already and couldnt figure it out. If theres nothing you can suggest why bother writing at all?
– redberry
Nov 10 at 20:22
I just tried accessing the URL you mentioned in your post and I am getting success response. So your problem hasn't reproduced to me. Can you try and check yourself again? May be server had some temporary problems, which got resolved. And now I can surely say, you don't have to fix anything at your end. Initially I thought may be you didn't pass some parameter or request body properly which might have resulted into this error, but that's not the case here as its a simple GET URL which needs no special headers/cookies/parameters. Sorry for the confusion and any inconvenience caused.
– Pushpesh Kumar Rajwanshi
Nov 10 at 20:28
That's the thing, the URL works well in browser, however when it comes to getting a response it fails with this code
– redberry
Nov 10 at 20:36
I just tried from code as well and I got the response successfully even from code. So seems like there is some silly mistake at your end only.
– Pushpesh Kumar Rajwanshi
Nov 10 at 20:39
Can you post your code?
– redberry
Nov 10 at 20:41
|
show 2 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to retrieve a JSON from an external API using Volley.
Here is my code
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test);
final TextView mTextView = findViewById(R.id.testreq);
RequestQueue queue = Volley.newRequestQueue(this);
String url = "https://horoscope-free-api.herokuapp.com/?time=today&sign=cancer";
StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
new Response.Listener<String>()
@Override
public void onResponse(String response)
// Display the first 500 characters of the response string.
mTextView.setText("Response is: "+ response.substring(0,500));
, new Response.ErrorListener()
@Override
public void onErrorResponse(VolleyError error)
mTextView.setText("That didn't work");
Log.d("Error", error.toString());
);
queue.add(stringRequest);
It seems like the response is done but I am getting this error
E/Volley: [277] BasicNetwork.performRequest: Unexpected response code 500
and when I ran a test on the API in https://apitester.com/ It tells me its passed and I get this error
Response Headers
HTTP/1.1 500 Internal Server Error
Connection: keep-alive
Date: Sat, 10 Nov 2018 19:56:18 GMT
Server: Apache
Transfer-Encoding: chunked
Content-Type: application/json
Via: 1.1 vegur
Any ideas how to solve this? Is it the API or is it me?
java
I am trying to retrieve a JSON from an external API using Volley.
Here is my code
protected void onCreate(Bundle savedInstanceState)
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test);
final TextView mTextView = findViewById(R.id.testreq);
RequestQueue queue = Volley.newRequestQueue(this);
String url = "https://horoscope-free-api.herokuapp.com/?time=today&sign=cancer";
StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
new Response.Listener<String>()
@Override
public void onResponse(String response)
// Display the first 500 characters of the response string.
mTextView.setText("Response is: "+ response.substring(0,500));
, new Response.ErrorListener()
@Override
public void onErrorResponse(VolleyError error)
mTextView.setText("That didn't work");
Log.d("Error", error.toString());
);
queue.add(stringRequest);
It seems like the response is done but I am getting this error
E/Volley: [277] BasicNetwork.performRequest: Unexpected response code 500
and when I ran a test on the API in https://apitester.com/ It tells me its passed and I get this error
Response Headers
HTTP/1.1 500 Internal Server Error
Connection: keep-alive
Date: Sat, 10 Nov 2018 19:56:18 GMT
Server: Apache
Transfer-Encoding: chunked
Content-Type: application/json
Via: 1.1 vegur
Any ideas how to solve this? Is it the API or is it me?
java
java
asked Nov 10 at 20:01
redberry
316
316
@PushpeshKumarRajwanshi I do understand that status 500 means thats server error, and thats why I am asking if its me not handling the request properly or no. I wasnt going to ask if I didnt check my code already and couldnt figure it out. If theres nothing you can suggest why bother writing at all?
– redberry
Nov 10 at 20:22
I just tried accessing the URL you mentioned in your post and I am getting success response. So your problem hasn't reproduced to me. Can you try and check yourself again? May be server had some temporary problems, which got resolved. And now I can surely say, you don't have to fix anything at your end. Initially I thought may be you didn't pass some parameter or request body properly which might have resulted into this error, but that's not the case here as its a simple GET URL which needs no special headers/cookies/parameters. Sorry for the confusion and any inconvenience caused.
– Pushpesh Kumar Rajwanshi
Nov 10 at 20:28
That's the thing, the URL works well in browser, however when it comes to getting a response it fails with this code
– redberry
Nov 10 at 20:36
I just tried from code as well and I got the response successfully even from code. So seems like there is some silly mistake at your end only.
– Pushpesh Kumar Rajwanshi
Nov 10 at 20:39
Can you post your code?
– redberry
Nov 10 at 20:41
|
show 2 more comments
@PushpeshKumarRajwanshi I do understand that status 500 means thats server error, and thats why I am asking if its me not handling the request properly or no. I wasnt going to ask if I didnt check my code already and couldnt figure it out. If theres nothing you can suggest why bother writing at all?
– redberry
Nov 10 at 20:22
I just tried accessing the URL you mentioned in your post and I am getting success response. So your problem hasn't reproduced to me. Can you try and check yourself again? May be server had some temporary problems, which got resolved. And now I can surely say, you don't have to fix anything at your end. Initially I thought may be you didn't pass some parameter or request body properly which might have resulted into this error, but that's not the case here as its a simple GET URL which needs no special headers/cookies/parameters. Sorry for the confusion and any inconvenience caused.
– Pushpesh Kumar Rajwanshi
Nov 10 at 20:28
That's the thing, the URL works well in browser, however when it comes to getting a response it fails with this code
– redberry
Nov 10 at 20:36
I just tried from code as well and I got the response successfully even from code. So seems like there is some silly mistake at your end only.
– Pushpesh Kumar Rajwanshi
Nov 10 at 20:39
Can you post your code?
– redberry
Nov 10 at 20:41
@PushpeshKumarRajwanshi I do understand that status 500 means thats server error, and thats why I am asking if its me not handling the request properly or no. I wasnt going to ask if I didnt check my code already and couldnt figure it out. If theres nothing you can suggest why bother writing at all?
– redberry
Nov 10 at 20:22
@PushpeshKumarRajwanshi I do understand that status 500 means thats server error, and thats why I am asking if its me not handling the request properly or no. I wasnt going to ask if I didnt check my code already and couldnt figure it out. If theres nothing you can suggest why bother writing at all?
– redberry
Nov 10 at 20:22
I just tried accessing the URL you mentioned in your post and I am getting success response. So your problem hasn't reproduced to me. Can you try and check yourself again? May be server had some temporary problems, which got resolved. And now I can surely say, you don't have to fix anything at your end. Initially I thought may be you didn't pass some parameter or request body properly which might have resulted into this error, but that's not the case here as its a simple GET URL which needs no special headers/cookies/parameters. Sorry for the confusion and any inconvenience caused.
– Pushpesh Kumar Rajwanshi
Nov 10 at 20:28
I just tried accessing the URL you mentioned in your post and I am getting success response. So your problem hasn't reproduced to me. Can you try and check yourself again? May be server had some temporary problems, which got resolved. And now I can surely say, you don't have to fix anything at your end. Initially I thought may be you didn't pass some parameter or request body properly which might have resulted into this error, but that's not the case here as its a simple GET URL which needs no special headers/cookies/parameters. Sorry for the confusion and any inconvenience caused.
– Pushpesh Kumar Rajwanshi
Nov 10 at 20:28
That's the thing, the URL works well in browser, however when it comes to getting a response it fails with this code
– redberry
Nov 10 at 20:36
That's the thing, the URL works well in browser, however when it comes to getting a response it fails with this code
– redberry
Nov 10 at 20:36
I just tried from code as well and I got the response successfully even from code. So seems like there is some silly mistake at your end only.
– Pushpesh Kumar Rajwanshi
Nov 10 at 20:39
I just tried from code as well and I got the response successfully even from code. So seems like there is some silly mistake at your end only.
– Pushpesh Kumar Rajwanshi
Nov 10 at 20:39
Can you post your code?
– redberry
Nov 10 at 20:41
Can you post your code?
– redberry
Nov 10 at 20:41
|
show 2 more comments
3 Answers
3
active
oldest
votes
up vote
0
down vote
accepted
HTTP Status Codes starting with 5 inform that the error is on server side. The code 500 is interpreted as Internal Server Error, to solve this you have to check what might cause it. It may be caused by a mistake in the code in that case you can open your error_log to see the error and act accordingly.
It can be caused by server features being unavailable momently like accessing the database or having many simultaneous opened connections that exceed the associated mysql resources.
Some other times, the error is not logged into the error_log file. If you use a cpanel, at the homepage, under Metrics tab open Errors and check according to the time you requested to the server. If you are not using cpanel look for a corresponding server log.
With the link passed in your question that error code should not be unless it's overwritten or hardcoded in your server side script.
See these three tests:

With this, I set both time and cancer parameters, and as you can see, the Error Code is 500 but within the response body, every thing is okay with status 200.

And with this, I still have the answer even if I just set one parameter. within the response body, there is an error not server error but customized error: there is a parameter missing. Guess what's the returned HTTP code(500)
And what if I remove all parameters?

Every thing is okay. The HTTP Status Code and response body.
That tells me that wether the author wants you to listen to customized request status rather than the returned HTTP Status Code. That's just my point of view.
add a comment |
up vote
0
down vote
Here is my code that successfully retrieves the json response from url,
HttpClient httpclient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet("https://horoscope-free-api.herokuapp.com/?time=today&sign=cancer");
HttpResponse response = httpclient.execute(httpGet);
HttpEntity resEntity = response.getEntity();
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
Streams.copy(resEntity.getContent(), byteArrayOutputStream, true);
String data = byteArrayOutputStream.toString("UTF-8");
System.out.println(data);
I am using HttpClient API but can be easily done by java net package.
add a comment |
up vote
0
down vote
I found a Bug on API you are using is sending response code 500 + Response Data.
And in volley whenever response code other then 200 to 299 is detected volley run there Error Listeners to handle it. That's why your code missed your Response data because Volley Error Listener get Call First.
Postman Picture mark with both Points
Frankly saying this is Nonstandard Poor Way of API Designing, which throwing status code on Responses as well.
Too things i want to tell you :
Start using Postman (If you are not using it)
Jamun Volley Library
start using helper libraries this is what i recommend you to Use which handle your most methods call and provide you better error handling with custom messages and individual status codes.
Hope this will help you to tackle future approaches.
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
HTTP Status Codes starting with 5 inform that the error is on server side. The code 500 is interpreted as Internal Server Error, to solve this you have to check what might cause it. It may be caused by a mistake in the code in that case you can open your error_log to see the error and act accordingly.
It can be caused by server features being unavailable momently like accessing the database or having many simultaneous opened connections that exceed the associated mysql resources.
Some other times, the error is not logged into the error_log file. If you use a cpanel, at the homepage, under Metrics tab open Errors and check according to the time you requested to the server. If you are not using cpanel look for a corresponding server log.
With the link passed in your question that error code should not be unless it's overwritten or hardcoded in your server side script.
See these three tests:

With this, I set both time and cancer parameters, and as you can see, the Error Code is 500 but within the response body, every thing is okay with status 200.

And with this, I still have the answer even if I just set one parameter. within the response body, there is an error not server error but customized error: there is a parameter missing. Guess what's the returned HTTP code(500)
And what if I remove all parameters?

Every thing is okay. The HTTP Status Code and response body.
That tells me that wether the author wants you to listen to customized request status rather than the returned HTTP Status Code. That's just my point of view.
add a comment |
up vote
0
down vote
accepted
HTTP Status Codes starting with 5 inform that the error is on server side. The code 500 is interpreted as Internal Server Error, to solve this you have to check what might cause it. It may be caused by a mistake in the code in that case you can open your error_log to see the error and act accordingly.
It can be caused by server features being unavailable momently like accessing the database or having many simultaneous opened connections that exceed the associated mysql resources.
Some other times, the error is not logged into the error_log file. If you use a cpanel, at the homepage, under Metrics tab open Errors and check according to the time you requested to the server. If you are not using cpanel look for a corresponding server log.
With the link passed in your question that error code should not be unless it's overwritten or hardcoded in your server side script.
See these three tests:

With this, I set both time and cancer parameters, and as you can see, the Error Code is 500 but within the response body, every thing is okay with status 200.

And with this, I still have the answer even if I just set one parameter. within the response body, there is an error not server error but customized error: there is a parameter missing. Guess what's the returned HTTP code(500)
And what if I remove all parameters?

Every thing is okay. The HTTP Status Code and response body.
That tells me that wether the author wants you to listen to customized request status rather than the returned HTTP Status Code. That's just my point of view.
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
HTTP Status Codes starting with 5 inform that the error is on server side. The code 500 is interpreted as Internal Server Error, to solve this you have to check what might cause it. It may be caused by a mistake in the code in that case you can open your error_log to see the error and act accordingly.
It can be caused by server features being unavailable momently like accessing the database or having many simultaneous opened connections that exceed the associated mysql resources.
Some other times, the error is not logged into the error_log file. If you use a cpanel, at the homepage, under Metrics tab open Errors and check according to the time you requested to the server. If you are not using cpanel look for a corresponding server log.
With the link passed in your question that error code should not be unless it's overwritten or hardcoded in your server side script.
See these three tests:

With this, I set both time and cancer parameters, and as you can see, the Error Code is 500 but within the response body, every thing is okay with status 200.

And with this, I still have the answer even if I just set one parameter. within the response body, there is an error not server error but customized error: there is a parameter missing. Guess what's the returned HTTP code(500)
And what if I remove all parameters?

Every thing is okay. The HTTP Status Code and response body.
That tells me that wether the author wants you to listen to customized request status rather than the returned HTTP Status Code. That's just my point of view.
HTTP Status Codes starting with 5 inform that the error is on server side. The code 500 is interpreted as Internal Server Error, to solve this you have to check what might cause it. It may be caused by a mistake in the code in that case you can open your error_log to see the error and act accordingly.
It can be caused by server features being unavailable momently like accessing the database or having many simultaneous opened connections that exceed the associated mysql resources.
Some other times, the error is not logged into the error_log file. If you use a cpanel, at the homepage, under Metrics tab open Errors and check according to the time you requested to the server. If you are not using cpanel look for a corresponding server log.
With the link passed in your question that error code should not be unless it's overwritten or hardcoded in your server side script.
See these three tests:

With this, I set both time and cancer parameters, and as you can see, the Error Code is 500 but within the response body, every thing is okay with status 200.

And with this, I still have the answer even if I just set one parameter. within the response body, there is an error not server error but customized error: there is a parameter missing. Guess what's the returned HTTP code(500)
And what if I remove all parameters?

Every thing is okay. The HTTP Status Code and response body.
That tells me that wether the author wants you to listen to customized request status rather than the returned HTTP Status Code. That's just my point of view.
edited Nov 10 at 21:18
answered Nov 10 at 21:00
gratien asimbahwe
7601722
7601722
add a comment |
add a comment |
up vote
0
down vote
Here is my code that successfully retrieves the json response from url,
HttpClient httpclient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet("https://horoscope-free-api.herokuapp.com/?time=today&sign=cancer");
HttpResponse response = httpclient.execute(httpGet);
HttpEntity resEntity = response.getEntity();
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
Streams.copy(resEntity.getContent(), byteArrayOutputStream, true);
String data = byteArrayOutputStream.toString("UTF-8");
System.out.println(data);
I am using HttpClient API but can be easily done by java net package.
add a comment |
up vote
0
down vote
Here is my code that successfully retrieves the json response from url,
HttpClient httpclient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet("https://horoscope-free-api.herokuapp.com/?time=today&sign=cancer");
HttpResponse response = httpclient.execute(httpGet);
HttpEntity resEntity = response.getEntity();
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
Streams.copy(resEntity.getContent(), byteArrayOutputStream, true);
String data = byteArrayOutputStream.toString("UTF-8");
System.out.println(data);
I am using HttpClient API but can be easily done by java net package.
add a comment |
up vote
0
down vote
up vote
0
down vote
Here is my code that successfully retrieves the json response from url,
HttpClient httpclient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet("https://horoscope-free-api.herokuapp.com/?time=today&sign=cancer");
HttpResponse response = httpclient.execute(httpGet);
HttpEntity resEntity = response.getEntity();
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
Streams.copy(resEntity.getContent(), byteArrayOutputStream, true);
String data = byteArrayOutputStream.toString("UTF-8");
System.out.println(data);
I am using HttpClient API but can be easily done by java net package.
Here is my code that successfully retrieves the json response from url,
HttpClient httpclient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet("https://horoscope-free-api.herokuapp.com/?time=today&sign=cancer");
HttpResponse response = httpclient.execute(httpGet);
HttpEntity resEntity = response.getEntity();
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
Streams.copy(resEntity.getContent(), byteArrayOutputStream, true);
String data = byteArrayOutputStream.toString("UTF-8");
System.out.println(data);
I am using HttpClient API but can be easily done by java net package.
answered Nov 10 at 20:47
Pushpesh Kumar Rajwanshi
2,6721821
2,6721821
add a comment |
add a comment |
up vote
0
down vote
I found a Bug on API you are using is sending response code 500 + Response Data.
And in volley whenever response code other then 200 to 299 is detected volley run there Error Listeners to handle it. That's why your code missed your Response data because Volley Error Listener get Call First.
Postman Picture mark with both Points
Frankly saying this is Nonstandard Poor Way of API Designing, which throwing status code on Responses as well.
Too things i want to tell you :
Start using Postman (If you are not using it)
Jamun Volley Library
start using helper libraries this is what i recommend you to Use which handle your most methods call and provide you better error handling with custom messages and individual status codes.
Hope this will help you to tackle future approaches.
add a comment |
up vote
0
down vote
I found a Bug on API you are using is sending response code 500 + Response Data.
And in volley whenever response code other then 200 to 299 is detected volley run there Error Listeners to handle it. That's why your code missed your Response data because Volley Error Listener get Call First.
Postman Picture mark with both Points
Frankly saying this is Nonstandard Poor Way of API Designing, which throwing status code on Responses as well.
Too things i want to tell you :
Start using Postman (If you are not using it)
Jamun Volley Library
start using helper libraries this is what i recommend you to Use which handle your most methods call and provide you better error handling with custom messages and individual status codes.
Hope this will help you to tackle future approaches.
add a comment |
up vote
0
down vote
up vote
0
down vote
I found a Bug on API you are using is sending response code 500 + Response Data.
And in volley whenever response code other then 200 to 299 is detected volley run there Error Listeners to handle it. That's why your code missed your Response data because Volley Error Listener get Call First.
Postman Picture mark with both Points
Frankly saying this is Nonstandard Poor Way of API Designing, which throwing status code on Responses as well.
Too things i want to tell you :
Start using Postman (If you are not using it)
Jamun Volley Library
start using helper libraries this is what i recommend you to Use which handle your most methods call and provide you better error handling with custom messages and individual status codes.
Hope this will help you to tackle future approaches.
I found a Bug on API you are using is sending response code 500 + Response Data.
And in volley whenever response code other then 200 to 299 is detected volley run there Error Listeners to handle it. That's why your code missed your Response data because Volley Error Listener get Call First.
Postman Picture mark with both Points
Frankly saying this is Nonstandard Poor Way of API Designing, which throwing status code on Responses as well.
Too things i want to tell you :
Start using Postman (If you are not using it)
Jamun Volley Library
start using helper libraries this is what i recommend you to Use which handle your most methods call and provide you better error handling with custom messages and individual status codes.
Hope this will help you to tackle future approaches.
answered Nov 13 at 18:04
Jatin Sahgal
11
11
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53242912%2fhow-to-deal-with-unexpected-response-500-in-android%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
@PushpeshKumarRajwanshi I do understand that status 500 means thats server error, and thats why I am asking if its me not handling the request properly or no. I wasnt going to ask if I didnt check my code already and couldnt figure it out. If theres nothing you can suggest why bother writing at all?
– redberry
Nov 10 at 20:22
I just tried accessing the URL you mentioned in your post and I am getting success response. So your problem hasn't reproduced to me. Can you try and check yourself again? May be server had some temporary problems, which got resolved. And now I can surely say, you don't have to fix anything at your end. Initially I thought may be you didn't pass some parameter or request body properly which might have resulted into this error, but that's not the case here as its a simple GET URL which needs no special headers/cookies/parameters. Sorry for the confusion and any inconvenience caused.
– Pushpesh Kumar Rajwanshi
Nov 10 at 20:28
That's the thing, the URL works well in browser, however when it comes to getting a response it fails with this code
– redberry
Nov 10 at 20:36
I just tried from code as well and I got the response successfully even from code. So seems like there is some silly mistake at your end only.
– Pushpesh Kumar Rajwanshi
Nov 10 at 20:39
Can you post your code?
– redberry
Nov 10 at 20:41