Add new ServerHandler package which handles requests

This commit is contained in:
Jesse Wierzbinski 2024-04-13 21:51:00 -10:00
parent 3cdd685035
commit 327a716b12
No known key found for this signature in database
10 changed files with 616 additions and 110 deletions

View file

@ -136,12 +136,8 @@ export class RequestParser {
* @private
* @throws Error if body is invalid
*/
private async parseJson<T>(): Promise<Partial<T>> {
try {
return (await this.request.json()) as T;
} catch {
return {};
}
private async parseJson<T>(): Promise<T> {
return (await this.request.json()) as T;
}
/**