@adonisjs/drive
Version:
A thin wrapper on top of Flydrive to work seamlessly with AdonisJS
29 lines (28 loc) • 800 B
TypeScript
import { HttpContext } from '@adonisjs/core/http';
import { Exception } from '@adonisjs/core/exceptions';
/**
* The exception is raised by the local file server when
* trying to serve a file during an HTTP request.
*/
export declare class CannotServeFileException extends Exception {
#private;
debug: boolean;
constructor(originalError: any);
/**
* Parses the original error to find the accurate error
* message, stack and the status code.
*/
parseError(error: this): {
stack: any;
status: number;
message: any;
};
/**
* Converts error to an HTTP response.
*/
handle(error: this, ctx: HttpContext): void;
/**
* Reporting the error using the logger
*/
report(error: this, ctx: HttpContext): void;
}