extractia-sdk 1.0.4 → 1.0.5

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.
@@ -2615,9 +2615,10 @@ var ExtractiaSDK = (() => {
2615
2615
  timeout: 1e4
2616
2616
  });
2617
2617
  api.interceptors.request.use((config) => {
2618
- if (token) {
2619
- config.headers.Authorization = `Bearer ${token}`;
2618
+ if (!token) {
2619
+ throw new Error("API token is required");
2620
2620
  }
2621
+ config.headers.Authorization = `Bearer ${token}`;
2621
2622
  return config;
2622
2623
  });
2623
2624
  function setToken(newToken) {