Class: NotFound

@nginstack/engine/lib/http/HttpError~HttpError. NotFound


new NotFound(error [, solution] [, details])

Classe de erro semelhante a HttpError, usada em controladoras para retornar erros HTTP com código de estado 404 (Not Found). Veja o exemplo abaixo.

Parameters:
Name Type Argument Description
error string
solution string <optional>
details string <optional>
Example
if (!dbcache.tableContainsKey('iVfs', fileKey)) {
   throw new HttpError.NotFound(
     'Arquivo não encontrado.',
     'Envie uma chave de arquivo válida.',
     'Chave enviada: ' + fileKey + '.'
   );
 }