prisma-generator-express 1.26.0 → 1.26.1

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.
@@ -129,7 +129,7 @@ function handleError(error: unknown, next: NextFunction): void {
129
129
  "name" in error &&
130
130
  error.name === "ShapeError"
131
131
  ) {
132
- next(new HttpError(400, (error as Error).message));
132
+ next(new HttpError(400, (error as any).message));
133
133
  return;
134
134
  }
135
135
 
@@ -139,7 +139,7 @@ function handleError(error: unknown, next: NextFunction): void {
139
139
  "name" in error &&
140
140
  error.name === "CallerError"
141
141
  ) {
142
- next(new HttpError(400, (error as Error).message));
142
+ next(new HttpError(400, (error as any).message));
143
143
  return;
144
144
  }
145
145
 
@@ -149,7 +149,7 @@ function handleError(error: unknown, next: NextFunction): void {
149
149
  "name" in error &&
150
150
  error.name === "PolicyError"
151
151
  ) {
152
- next(new HttpError(403, (error as Error).message));
152
+ next(new HttpError(403, (error as any).message));
153
153
  return;
154
154
  }
155
155
 
@@ -163,7 +163,7 @@ function handleError(error: unknown, next: NextFunction): void {
163
163
  const issues = (error as any).issues;
164
164
  const message = Array.isArray(issues)
165
165
  ? issues.map((i: any) => i.message).join("; ")
166
- : (error as Error).message;
166
+ : (error as any).message;
167
167
  next(new HttpError(400, message));
168
168
  return;
169
169
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prisma-generator-express",
3
3
  "description": "Prisma generator for Hono CRUD API with OpenAPI documentation",
4
- "version": "1.26.0",
4
+ "version": "1.26.1",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "MIT",
@@ -135,7 +135,7 @@ function handleError(error: unknown, next: NextFunction): void {
135
135
  "name" in error &&
136
136
  error.name === "ShapeError"
137
137
  ) {
138
- next(new HttpError(400, (error as Error).message));
138
+ next(new HttpError(400, (error as any).message));
139
139
  return;
140
140
  }
141
141
 
@@ -145,7 +145,7 @@ function handleError(error: unknown, next: NextFunction): void {
145
145
  "name" in error &&
146
146
  error.name === "CallerError"
147
147
  ) {
148
- next(new HttpError(400, (error as Error).message));
148
+ next(new HttpError(400, (error as any).message));
149
149
  return;
150
150
  }
151
151
 
@@ -155,7 +155,7 @@ function handleError(error: unknown, next: NextFunction): void {
155
155
  "name" in error &&
156
156
  error.name === "PolicyError"
157
157
  ) {
158
- next(new HttpError(403, (error as Error).message));
158
+ next(new HttpError(403, (error as any).message));
159
159
  return;
160
160
  }
161
161
 
@@ -169,7 +169,7 @@ function handleError(error: unknown, next: NextFunction): void {
169
169
  const issues = (error as any).issues;
170
170
  const message = Array.isArray(issues)
171
171
  ? issues.map((i: any) => i.message).join("; ")
172
- : (error as Error).message;
172
+ : (error as any).message;
173
173
  next(new HttpError(400, message));
174
174
  return;
175
175
  }