summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Ming-jun Lu <40516784+mingjunlu@users.noreply.github.com> 2024-02-27 15:17:51 +0800
committerGravatar GitHub <noreply@github.com> 2024-02-27 07:17:51 +0000
commit9c21a9df6b03e36bd78dc553e13c55b9ef8c44cd (patch)
treeddb201313d4e481e79274251554b2c7b48859766
parent03242c6c2259dc583b21c12ad60109ac72aa9d52 (diff)
downloadastro-9c21a9df6b03e36bd78dc553e13c55b9ef8c44cd.tar.gz
astro-9c21a9df6b03e36bd78dc553e13c55b9ef8c44cd.tar.zst
astro-9c21a9df6b03e36bd78dc553e13c55b9ef8c44cd.zip
Improve the message of `MiddlewareCantBeLoaded` for clarity (#10239)
* Improve the message of `MiddlewareCantBeLoaded` for clarity * Add changeset
-rw-r--r--.changeset/tall-papayas-drive.md5
-rw-r--r--packages/astro/src/core/errors/errors-data.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/tall-papayas-drive.md b/.changeset/tall-papayas-drive.md
new file mode 100644
index 000000000..3e42ac98f
--- /dev/null
+++ b/.changeset/tall-papayas-drive.md
@@ -0,0 +1,5 @@
+---
+"astro": patch
+---
+
+Improves the message of `MiddlewareCantBeLoaded` for clarity
diff --git a/packages/astro/src/core/errors/errors-data.ts b/packages/astro/src/core/errors/errors-data.ts
index 5336a47b3..40bcab111 100644
--- a/packages/astro/src/core/errors/errors-data.ts
+++ b/packages/astro/src/core/errors/errors-data.ts
@@ -828,7 +828,7 @@ export const LocalsNotAnObject = {
export const MiddlewareCantBeLoaded = {
name: 'MiddlewareCantBeLoaded',
title: "Can't load the middleware.",
- message: 'The middleware threw an error while Astro was trying to loading it.',
+ message: 'An unknown error was thrown while loading your middleware.',
} satisfies ErrorData;
/**