Skip to content

Commit f9aee5d

Browse files
committed
Improve default error messages
1 parent 7b671f5 commit f9aee5d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ServerErrorRegistry.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ class ServerErrorRegistry<A> {
1414
public constructor() {
1515
this.responses = {
1616
[ServerErrorRegistry.ErrorCodes.BAD_URL]:
17-
new TextResponse("Bad request URL.", 400),
17+
new TextResponse("Invalid request URL.", 400),
1818

1919
[ServerErrorRegistry.ErrorCodes.NO_ROUTE]:
20-
new TextResponse("No route in this registry matches the request.", 404),
20+
new TextResponse("No route matched the request.", 404),
2121

2222
[ServerErrorRegistry.ErrorCodes.INTERNAL]:
23-
new TextResponse("An internal error occurred.", 500),
23+
new TextResponse("An unexpected internal server error occurred.", 500),
2424

2525
[ServerErrorRegistry.ErrorCodes.PRECONDITION_FAILED]:
26-
new TextResponse("Precondition failed.", 412),
26+
new TextResponse("One or more preconditions were not met.", 412),
2727

2828
[ServerErrorRegistry.ErrorCodes.NO_PERMISSION]:
29-
new TextResponse("You do not have permission to perform this action.", 403),
29+
new TextResponse("You do not have the necessary permissions to perform this action.", 403),
3030
};
3131
}
3232

0 commit comments

Comments
 (0)