Hey I have an ajax call that I'm using which goes to a controller and ultimately makes a sql call. I'm using a deprecated version using .success
$.ajax({
type: "POST",
url: "/group/create",
data: postData,
context: this
}).success(function(msg) {
if (msg.errors) {
//showCreateGroupErrors(msg.errors);
this.setState({
error: true,
errorMsg: msg.errors[0]
});
} else {
//showCreateGroupSuccess("Group successfully created!");
this.props.addGroup(this.state.familyName);
this.props.update();
}
});
The problem is whenever I get sql syntax error
the sql request goes through but I don't get any type of error or call back time deal that I can latch on to and print through console or what ever. Any Ideas?
Usually it would be carried in the msg
object above but in my test cases it just circumvents the .success
function. Not sure whats going on.