We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e234a0f commit c7c1a80Copy full SHA for c7c1a80
.changeset/full-trams-learn.md
@@ -0,0 +1,5 @@
1
+---
2
+"@browserbasehq/stagehand": patch
3
4
+
5
+Fix to remove unnecessary healtcheck ping on sdk
lib/api.ts
@@ -60,7 +60,11 @@ export class StagehandAPI {
60
},
61
});
62
63
- if (sessionResponse.status !== 200) {
+ if (sessionResponse.status === 401) {
64
+ throw new Error(
65
+ "Unauthorized. Ensure you provided a valid API key and that it is whitelisted.",
66
+ );
67
+ } else if (sessionResponse.status !== 200) {
68
console.log(await sessionResponse.text());
69
throw new Error(`Unknown error: ${sessionResponse.status}`);
70
}
0 commit comments