response lifecycle timeout and route handling
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import {Instantiable, Singleton, Inject} from "@extollo/di"
|
||||
import {Collection} from "@extollo/util"
|
||||
import {Inject, Instantiable, Singleton} from "@extollo/di"
|
||||
import {Collection, HTTPStatus} from "@extollo/util"
|
||||
import {HTTPKernelModule} from "./HTTPKernelModule";
|
||||
import {Logging} from "../../service/Logging";
|
||||
import {AppClass} from "../../lifecycle/AppClass";
|
||||
import {Request} from "../lifecycle/Request";
|
||||
import {http} from "../response/HTTPErrorResponseFactory";
|
||||
|
||||
/**
|
||||
* Interface for fluently registering kernel modules into the kernel.
|
||||
@@ -72,11 +73,10 @@ export class HTTPKernel extends AppClass {
|
||||
}
|
||||
} catch (e: any) {
|
||||
this.logging.error(e)
|
||||
// FIXME handle error response
|
||||
// const error_response = error(e)
|
||||
// await error_response.write(request)
|
||||
await http(HTTPStatus.REQUEST_TIMEOUT).write(request)
|
||||
}
|
||||
|
||||
this.logging.verbose('Finished kernel lifecycle')
|
||||
return request
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user