@mynitorai/sdk 0.2.7 → 0.2.9

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.
Files changed (2) hide show
  1. package/dist/cli.js +4 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -31,6 +31,10 @@ async function run() {
31
31
  headers: { 'Authorization': `Bearer ${apiKey}` }
32
32
  });
33
33
  if (res.ok) {
34
+ const contentType = res.headers.get('content-type');
35
+ if (contentType && contentType.includes('text/html')) {
36
+ throw new Error('Received HTML response instead of JSON. You might be behind a login portal or proxy redirect.');
37
+ }
34
38
  const data = await res.json();
35
39
  console.log(`✅ Connection: MyNitor Cloud is reachable`);
36
40
  console.log(`✅ Organization: ${data.orgId || 'Verified'}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mynitorai/sdk",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "Production safety and observability for AI systems.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {