Skip to content

Commit

Permalink
Removed unnecessary lines
Browse files Browse the repository at this point in the history
  • Loading branch information
elizachi committed Jan 13, 2024
1 parent fabab7a commit 1daa1d4
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/presentation/http/http-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { EditorToolSchema } from './schema/EditorTool.js';
import { DomainError } from '@domain/entities/domainError.js';
import JoinRouter from '@presentation/http/router/join.js';
import { JoinSchemaParams, JoinSchemaResponse } from './schema/Join.js';
import { DomainError } from '@domain/entities/domainError.js';


const appServerLogger = getLogger('appServer');
Expand Down Expand Up @@ -351,20 +350,5 @@ export default class HttpApi implements Api {
}
});
}

/**
* Domain error handler
*/
private domainErrorHandler(): void {
this.server?.setErrorHandler(function (error, request, reply) {
/**
* If we have an error that occurs in the domain-level we reply it with special format
*/
if (error instanceof DomainError) {
this.log.error(error);
void reply.domainError(error.message);
}
});
}
}

0 comments on commit 1daa1d4

Please sign in to comment.