Better handle document errors

Avoid exception if the error response does not contain add/delete field
Added signed document queries