@platformatic/composer 2.44.4 → 2.45.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.
package/lib/proxy.js CHANGED
@@ -1,6 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  const httpProxy = require('@fastify/http-proxy')
4
+ const { ensureLoggableError } = require('@platformatic/utils')
4
5
  const fp = require('fastify-plugin')
5
6
  const { workerData } = require('node:worker_threads')
6
7
  const { getGlobalDispatcher } = require('undici')
@@ -213,6 +214,10 @@ module.exports = fp(async function (app, opts) {
213
214
  headers: res.headers
214
215
  })
215
216
  reply.send(res.stream)
217
+ },
218
+ onError: (reply, { error }) => {
219
+ app.log.error({ error: ensureLoggableError(error) }, 'Error while proxying request to another service')
220
+ return reply.send(error)
216
221
  }
217
222
  }
218
223
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/composer",
3
- "version": "2.44.4",
3
+ "version": "2.45.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -31,9 +31,9 @@
31
31
  "typescript": "^5.5.4",
32
32
  "why-is-node-running": "2",
33
33
  "ws": "^8.16.0",
34
- "@platformatic/config": "2.44.4",
35
- "@platformatic/db": "2.44.4",
36
- "@platformatic/client": "2.44.4"
34
+ "@platformatic/client": "2.45.0",
35
+ "@platformatic/config": "2.45.0",
36
+ "@platformatic/db": "2.45.0"
37
37
  },
38
38
  "dependencies": {
39
39
  "@fastify/error": "^4.0.0",
@@ -67,12 +67,12 @@
67
67
  "rfdc": "^1.3.1",
68
68
  "semgrator": "^0.3.0",
69
69
  "undici": "^7.0.0",
70
- "@platformatic/generators": "2.44.4",
71
- "@platformatic/scalar-theme": "2.44.4",
72
- "@platformatic/telemetry": "2.44.4",
73
- "@platformatic/service": "2.44.4",
74
- "@platformatic/config": "2.44.4",
75
- "@platformatic/utils": "^2.44.4"
70
+ "@platformatic/config": "2.45.0",
71
+ "@platformatic/scalar-theme": "2.45.0",
72
+ "@platformatic/generators": "2.45.0",
73
+ "@platformatic/service": "2.45.0",
74
+ "@platformatic/telemetry": "2.45.0",
75
+ "@platformatic/utils": "^2.45.0"
76
76
  },
77
77
  "scripts": {
78
78
  "test": "pnpm run lint && borp -T --timeout=300000 -c 1 && tsd",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/composer/2.44.4.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/composer/2.45.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Composer",
5
5
  "type": "object",