I built a web system months ago using Laravel 4.1 and in my requests I used Response::json(); to return data to jquery ajax. 

* 200 to return a success and catched by .done() of ajax.
* 400 to return a fail/error and catched by .fail() of ajax.

And works very good!

The problem now, I'm building another web system with Laravel 4.2 and I'm using the same error codes 200 and 400... 200 works fine but 400 not working because for example:

**Laravel**

```
<?php

    public function example()
    {
        if (Input::get('param1') === 'value1') {
            return Response::json(array(
                'msg' => 'Correct!' 
            ), 200);
        }

        return Response::json(array(
            'msg' => 'Incorrect!'
        ), 400);
    }
?>

```

**jQuery** (I'm using the same jquery version: 1.10.2)

```
$.ajax({
    url: 'example',
    type: 'post',
    dataType: 'json',
    data: {param1: 'value1'},
})
.done(function(data) {
    console.log(data.msg);
})
.fail(function(data) {
    console.log(data.msg);
})
.always(function() {
    console.log("complete");
});

```

I both cases, the request return the json correctly but...

When is Correct/200, .done() of ajax displays the message correctly in console but if it's Incorrect/400, .fail() of ajax not display the message but display **undefined** and I don't know what happend.

I hope you can help me.

**Solved**

Check my self-answer.