mcp-reddit-ads 1.0.7 → 1.0.8
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.
- package/dist/build-info.json +1 -1
- package/dist/errors.js +2 -2
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"sha":"
|
|
1
|
+
{"sha":"47102e6","builtAt":"2026-04-09T21:47:45.119Z"}
|
package/dist/errors.js
CHANGED
|
@@ -12,7 +12,7 @@ export class RedditAdsAuthError extends Error {
|
|
|
12
12
|
export class RedditAdsRateLimitError extends Error {
|
|
13
13
|
retryAfterMs;
|
|
14
14
|
constructor(retryAfterMs, cause) {
|
|
15
|
-
super(`
|
|
15
|
+
super(`Reddit Ads rate limited, retry after ${retryAfterMs}ms`);
|
|
16
16
|
this.retryAfterMs = retryAfterMs;
|
|
17
17
|
this.name = "RedditAdsRateLimitError";
|
|
18
18
|
this.cause = cause;
|
|
@@ -47,7 +47,7 @@ export function classifyError(error) {
|
|
|
47
47
|
message.includes("OAuth") ||
|
|
48
48
|
message.includes("Unauthorized") ||
|
|
49
49
|
message.includes("Forbidden")) {
|
|
50
|
-
return new RedditAdsAuthError(`
|
|
50
|
+
return new RedditAdsAuthError(`Reddit Ads auth failed: ${message}. Refresh token may be expired. Update REDDIT_REFRESH_TOKEN in Keychain.`, error);
|
|
51
51
|
}
|
|
52
52
|
if (status === 429 || message.includes("rate limit") || message.includes("Rate limit")) {
|
|
53
53
|
const retryMs = error?.retryAfterMs || 60_000;
|
package/dist/index.js
CHANGED
|
@@ -504,6 +504,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
504
504
|
error: true,
|
|
505
505
|
error_type: error.name,
|
|
506
506
|
message: error.message,
|
|
507
|
+
server: __cliPkg.name,
|
|
507
508
|
};
|
|
508
509
|
if (error instanceof RedditAdsAuthError) {
|
|
509
510
|
response.action_required = "Re-authenticate: refresh token may be expired. Run oauth_flow.py and update Keychain.";
|
|
@@ -519,8 +520,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
519
520
|
response.details = rawError.stack;
|
|
520
521
|
}
|
|
521
522
|
return {
|
|
522
|
-
content: [{ type: "text", text: JSON.stringify(response, null, 2) }],
|
|
523
523
|
isError: true,
|
|
524
|
+
content: [{ type: "text", text: JSON.stringify(response, null, 2) }],
|
|
524
525
|
};
|
|
525
526
|
}
|
|
526
527
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-reddit-ads",
|
|
3
3
|
"mcpName": "io.github.mharnett/reddit-ads",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.8",
|
|
5
5
|
"description": "MCP server for Reddit Ads API v3 with campaign, ad group, ad management, and performance reporting.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"bin": {
|