@mastra/deployer 1.46.1-alpha.1 → 1.47.0-alpha.3

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.
@@ -3265,11 +3265,15 @@ var MastraServer = class extends MastraServer$1 {
3265
3265
  const result = await route.handler(handlerParams);
3266
3266
  return this.sendResponse(route, c, result, prefix);
3267
3267
  } catch (error) {
3268
- this.mastra.getLogger()?.error("Error calling handler", {
3269
- error: error instanceof Error ? { message: error.message, stack: error.stack } : error,
3270
- path: route.path,
3271
- method: route.method
3272
- });
3268
+ const httpStatus = error && typeof error === "object" && "status" in error ? error.status : void 0;
3269
+ const isClientError = typeof httpStatus === "number" && httpStatus >= 400 && httpStatus < 500;
3270
+ if (!isClientError) {
3271
+ this.mastra.getLogger()?.error("Error calling handler", {
3272
+ error: error instanceof Error ? { message: error.message, stack: error.stack } : error,
3273
+ path: route.path,
3274
+ method: route.method
3275
+ });
3276
+ }
3273
3277
  if (error && typeof error === "object") {
3274
3278
  if ("status" in error) {
3275
3279
  const status = error.status;