Q:

Angular $http Inceptor

My understanding were that when I make an $http.post() Like below code, then my interceptor should prehandle the incomming data and response to it's error/success method. But when I do $q.reject(response.data); (and I've checked that the data are there). Then in my error I'd get those data that I reject with. But i don't data in the .error is null  
Code:
LTS is my module
Http request
$http.post("/overview", searchCriterias).success(function(data) {
                console.log('InboundController : success in http call');
                $scope.searchState = "result";
                $scope.result = data;
            }).error(function(data, status, headers, config) {
                console.log('InboundController : error in http call');
                $scope.searchState = "error";
                console.log(data);
                if (data.errorMessage)
                    $scope.result = data.errorMessage;
                else
                    $scope.result = data;
            });

Interceptor
LTS.factory('defaultHttpInterceptor', function($q) {
    return {
        response: function(response) {
            // do something on success
//            console.log(response.headers());
            if (response.headers()['content-type'].indexOf("application/json;charset=UTF-8") > -1) {
//                 Validate response, if not ok reject
                var dataPresent = response.data;
                if (dataPresent && dataPresent.state && dataPresent.state !== "OK") {
                    console.log(response.data);
                    return $q.reject(response.data);
                } else {
                    return response.data;
                }
            }
            return response;
        },
        responseError: function(response) {
            // do something on error
            console.log('defaultHttpInterceptor : http error');
            return $q.reject(response);
        }
    };
});
LTS.config(function($httpProvider) {
    $httpProvider.interceptors.push('defaultHttpInterceptor');
});

A:

Ahh found out that $q.reject(response) already unpacks the .data to the error handler.
So my .error got null because the response.data did not have a .data (response.data.data) attribute (of cause).  
I'll let it stand for future references.

