Improve error on attempt to delete missing template
This commit is contained in:
parent
b5f54ff534
commit
ef3733aebe
@ -291,6 +291,9 @@ o.delTemplate = function(owner, tpl_id, callback) {
|
||||
},
|
||||
function delCertificate(err, tplval) {
|
||||
if ( err ) throw err;
|
||||
if ( ! tplval ) {
|
||||
throw new Error("Template '" + tpl_id + "' of user '" + owner + "' does not exist");
|
||||
}
|
||||
var tpl = JSON.parse(tplval);
|
||||
if ( ! tpl.auth_id ) {
|
||||
// not sure this is an error, in case we'll ever
|
||||
|
Loading…
Reference in New Issue
Block a user