Since the error returned is a json, it is now processed directly as a string
Solution:
if(error.response.status>400){
message.error(error.data);
}
To
if(error.response.status>400){
message.error(error.data.message?error.data.message:error.data);
}