diff --git a/package-lock.json b/package-lock.json index bdc0637..33c978f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nestjs-enlighten", - "version": "0.0.5-beta", + "version": "0.0.6-beta", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index c211b66..07222f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nestjs-enlighten", - "version": "0.0.5-beta", + "version": "0.0.6-beta", "description": "A laravel-ignition like error page for NestJS Apps", "author": "Onur Ozkan ", "license": "MIT", diff --git a/tsconfig.json b/tsconfig.json index c56469a..b8ec73d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,7 @@ "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, - "target": "esnext", + "target": "ES2018", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", diff --git a/views/index.ejs b/views/index.ejs index 58f3a2b..7bd465e 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -7,7 +7,11 @@ - <%= response?.error %> + + <% if (response && response.error) { %> + <%= response.error %> + <% } %> + @@ -69,11 +73,20 @@
- <%= errorObject.error %> [<%= response?.statusCode || 500 %>] + <%= errorObject.error %> + <% if (response && response.statusCode) { %> + [<%= response.statusCode %>] + <% } %> + + <% if (!response) { %> + [500] + <% } %>
- <%= response?.message %> + <% if (response && response.message) { %> + <%= response.message %> + <% } %>