screwdriver-api 4.1.233 → 4.1.236

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-api",
3
- "version": "4.1.233",
3
+ "version": "4.1.236",
4
4
  "description": "API server for the Screwdriver.cd service",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -78,7 +78,7 @@
78
78
  "@hapi/hoek": "^9.1.1",
79
79
  "@hapi/inert": "^6.0.4",
80
80
  "@hapi/vision": "^6.1.0",
81
- "@promster/hapi": "^4.2.1",
81
+ "@promster/hapi": "^6.1.0",
82
82
  "async": "^3.2.2",
83
83
  "badge-maker": "^3.3.1",
84
84
  "config": "^1.31.0",
@@ -16,7 +16,7 @@ module.exports = {
16
16
  server.route({
17
17
  method: 'GET',
18
18
  path: '/metrics',
19
- handler: (_, h) => h.response(getSummary()),
19
+ handler: async (_, h) => h.response(await getSummary()),
20
20
  config: {
21
21
  plugins: {
22
22
  'hapi-rate-limit': {
@@ -54,10 +54,6 @@ module.exports = () => ({
54
54
  );
55
55
  }
56
56
  })
57
- .catch(error => {
58
- // 404 error throws, if branch name is incorrect
59
- throw boom.boomify(error, { statusCode: error.statusCode });
60
- })
61
57
  .then(() => {
62
58
  let scmUrl = checkoutUrl;
63
59
 
@@ -75,6 +71,10 @@ module.exports = () => ({
75
71
  message
76
72
  });
77
73
  })
74
+ .catch(error => {
75
+ // 404 error throws, if branch name is incorrect
76
+ throw boom.boomify(error, { statusCode: error.statusCode });
77
+ })
78
78
  );
79
79
  })
80
80
  .then(async pullRequest => {