configurapi 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/service.js +17 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "configurapi",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "A configurable API framework",
5
5
  "main": "src/configurapi.js",
6
6
  "types": "src/configurapi.d.ts",
package/src/service.js CHANGED
@@ -90,7 +90,23 @@ module.exports = class Service extends events.EventEmitter
90
90
  {
91
91
  if (!this.isReady)
92
92
  {
93
- await this.onStartPromise
93
+ try
94
+ {
95
+ await this.onStartPromise
96
+ await this._handleEvent('on_first_request', event);
97
+ }
98
+ catch(error)
99
+ {
100
+ try
101
+ {
102
+ await this._handleError(event, error);
103
+ }
104
+ finally
105
+ {
106
+ throw error;
107
+ }
108
+ }
109
+
94
110
  this.isReady = true;
95
111
  }
96
112