Commit 195c0281 authored by nanahira's avatar nanahira

fix empty string of actionErrorMessage

parent 70f22024
...@@ -22,8 +22,11 @@ export class KoishiExceptionHandlerService extends ConsoleLogger { ...@@ -22,8 +22,11 @@ export class KoishiExceptionHandlerService extends ConsoleLogger {
return e.message; return e.message;
} else { } else {
this.error(e.message, e.stack); this.error(e.message, e.stack);
if (this.koishiModuleOptions.actionErrorMessage === '') {
return;
}
return ( return (
this.koishiModuleOptions.actionErrorMessage || 'Internal Server Error' this.koishiModuleOptions.actionErrorMessage ?? 'Internal Server Error'
); );
} }
} }
......
...@@ -18,7 +18,6 @@ import { Module } from '@nestjs/core/injector/module'; ...@@ -18,7 +18,6 @@ import { Module } from '@nestjs/core/injector/module';
import { KoishiMetadataFetcherService } from '../koishi-metadata-fetcher/koishi-metadata-fetcher.service'; import { KoishiMetadataFetcherService } from '../koishi-metadata-fetcher/koishi-metadata-fetcher.service';
import { KoishiInterceptorManagerService } from '../koishi-interceptor-manager/koishi-interceptor-manager.service'; import { KoishiInterceptorManagerService } from '../koishi-interceptor-manager/koishi-interceptor-manager.service';
import { CommandRegisterConfig, Registrar } from 'koishi-decorators'; import { CommandRegisterConfig, Registrar } from 'koishi-decorators';
import { handleActionException } from '../utility/wrap-action';
import { KoishiExceptionHandlerService } from '../koishi-exception-handler/koishi-exception-handler.service'; import { KoishiExceptionHandlerService } from '../koishi-exception-handler/koishi-exception-handler.service';
@Injectable() @Injectable()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment