CloudOpting / cloudopting-manager

The cloudopting core manager
MIT License
10 stars 7 forks source link

500 error when publishing a service #308

Closed ciprianpavel closed 8 years ago

ciprianpavel commented 8 years ago

When creating a new service even if the server returns error 500 the UI displays a successful message.

500_error

The uploaded TOSCA file was generated by TOSCA IDE Editor. TOSCA_Archive (4).zip

xeviscc commented 8 years ago

Cannot reproduce it: The code that is executed and fails in your picture should be the following.

        var checkStatusCallback = function(data, status, headers, config){
            if(status==401) {
                //Unauthorised. Check if signed in.
                if(Principal.isAuthenticated()){
                    $scope.errorMessage = $translate.instant("callback.no_permissions");
                    return false;
                } else {
                    $scope.errorMessage = $translate.instant("callback.session_ended");
                    $timeout(function() {
                        $state.go('login');
                    }, 3000);
                    return false;
                }
            }else if(status!=200 && status!=201) {
                //Show message
                $scope.errorMessage = $translate.instant("callback.generic_error");
                return false;
            } else {
                //Return to the list
                $scope.infoMessage = $translate.instant("callback.success");
                return true;
            }
        };

Test it again, if it fails reopen this issue.