brightspace-mcp-server 3.11.2 → 3.11.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.
@@ -7,7 +7,7 @@ import { ApiError, NetworkError, RateLimitError } from "./errors.js";
7
7
  const JITTER_FRACTION = 0.3;
8
8
  const defaultSleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
9
9
  export async function withRetry(fn, options) {
10
- const { maxAttempts = 3, initialMs = 250, maxMs = 5000, sleep = defaultSleep, jitter = Math.random, shouldRetry, retryAfterMs, } = options;
10
+ const { maxAttempts = 3, initialMs = 250, maxMs = 5000, maxRetryAfterMs = 30_000, sleep = defaultSleep, jitter = Math.random, shouldRetry, retryAfterMs, } = options;
11
11
  for (let attempt = 1;; attempt++) {
12
12
  try {
13
13
  return await fn();
@@ -18,6 +18,8 @@ export async function withRetry(fn, options) {
18
18
  const requested = retryAfterMs?.(error);
19
19
  let delay;
20
20
  if (requested !== undefined) {
21
+ if (requested > maxRetryAfterMs)
22
+ throw error;
21
23
  delay = requested;
22
24
  }
23
25
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brightspace-mcp-server",
3
- "version": "3.11.2",
3
+ "version": "3.11.3",
4
4
  "mcpName": "io.github.RohanMuppa/brightspace",
5
5
  "description": "MCP server for Brightspace (D2L). Check grades, due dates, assignments, announcements, syllabus, rosters and more via Claude, ChatGPT, Cursor, Windsurf, or any MCP client.",
6
6
  "type": "module",