user3773872
user3773872

Reputation: 61

Handling exceptions in breeze

Does anyone know how to handle exception sent from server? It might be unauthorized exception or no response from server as well.

var query = breeze.EntityQuery.from("Partners");
manager.executeQuery(query, function (data) {
............
}

Data is being fetched using the code very well. I just want to add a exception handler.

Upvotes: 0

Views: 133

Answers (1)

parthicool05
parthicool05

Reputation: 255

Try this... In the function failed it throws the exception message

var query = breeze.EntityQuery.from("Partners");
manager.executeQuery(query).then(success).fail(failed)

function success(data){

}
function failed(error){

}

Upvotes: 1

Related Questions