Adding parameter to be able to manage errors

With this we are able to manage the requests when the query doesn´t return anything