Response status 500 error

Asked on January 10, 2018

I have spring micro-service project, when i login first time it works properly after some time if i hit continuously to end point it starts giving error code 500.

Can anyone give me the solution?

Thanks & Regards

Replied on January 11, 2018
Check your log file for any error. 
500 is Internal Server Error. Application is throwing error such as Null Pointer Exception. That is why you are 500 status code. 

Replied on January 16, 2018
Hello @amit,

Thank you for the reply.

Now i am not getting 500 error, but i am getting error like "JSON.parse: unexpected end of data at line 1 column 1 of the JSON data". In my java backend data printing properly but in angular 2 i am facing that error.

private extractData(res: Response) {
let body = res.json();
return body;
 the above function should return the json but i get exception when i continuously hit the url and throwing the exception.

Kindly help me out in this.


Replied on January 16, 2018
According to error, something is wrong in JSON fromat and that is why you are getting JSON.parse error.
Error says that unexpected end of data in your JSON. 

Provide your sample JSON data from backend.

Replied on January 17, 2018
Hello @amit,


the above format is my json data.

Replied on January 17, 2018
JSON is valid. You need to debug more to find the exact error.

Write Answer

©2024 | Privacy Policy | Contact Us