mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
refactor: Remove eslint-disable when possible
This commit is contained in:
@@ -61,10 +61,9 @@ export class HandlerServerConfigurator extends ServerConfigurator {
|
||||
*/
|
||||
private createErrorMessage(error: unknown): string {
|
||||
if (!isError(error)) {
|
||||
// eslint-disable-next-line ts/restrict-template-expressions
|
||||
return `Unknown error: ${error}.\n`;
|
||||
return `Unknown error: ${error as string}.\n`;
|
||||
}
|
||||
if (this.showStackTrace && error.stack) {
|
||||
if (this.showStackTrace && isError(error) && error.stack) {
|
||||
return `${error.stack}\n`;
|
||||
}
|
||||
return `${error.name}: ${error.message}\n`;
|
||||
|
||||
Reference in New Issue
Block a user