hi guys,
maybe you can help me, i reaaly don't know how to solve my problem

here is my code:
if((!isNaN($scope.toSearch))&&($scope.toSearch.length==11)){
            /*inizio case*/
            
$http.get(server[0]+getServizi.piva[0].start.replace("variabile1",$scope.toSearch)+getServizi.piva[0].end.replace("variabile2",sigla))
                .success(function(data){
                    /*completamento barra*/
                    $scope.value=100;
                    $scope.type='success';
                    $scope.typeMessage=barmessage.success;
                    /*getrisultato*/
                    var resGet=data.RECORD[0].RICORRENZA[0].VIO001;
                    var id=0;
                    for(var 
i=0;i<data.RECORD[0].RICORRENZA[0].VIO001.length;i++){
                        
if((resGet[i].STAATT=='R')&&(resGet[i].CCIAA==resGet[i].PRVSEDE)){
                            id=id+1;
                            $scope.risultato.push({id:id,
                                        ragioneSociale:resGet[i].RAGSOC,
                                        
indirizzo:resGet[i].VIO011[0].S2VIA1+" "+resGet[i].VIO011[0].VIASEDE+" 
"+resGet[i].VIO011[0].NCIVSEDE+" "+resGet[i].VIO011[0].FRAZSEDE+" 
"+resGet[i].VIO011[0].S2COMUNI1,
                                        codiceFiscale:resGet[i].CODFIS,
                                        tipoSocieta:resGet[i].S2NATGIU,
                                        attivita:resGet[i]['CISTAT07-XD']
                                        });
                            };
                        }
                    })
                .error(function(data,status){
                    /*completamento barra*/
                    $scope.value=100;
                    $scope.type='danger';
                    $scope.typeMessage=barmessage.danger;
                    $scope.alerts.push({ type: 'danger', msg: 'Errore 
numero: ' });
                    /*getrisultato*/
                    alert("errore richiesta ricerca "+status);
                });

the problem is that when i send wrong url the alert always get me a 404 
status code, even if in the console i can see that the status is different, 
like 500 internal error, or others, why i get only 404 error? how can i do 
to get the right status code from the server?

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to