polyapi 0.23.23 → 0.23.24

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.
@@ -43,9 +43,12 @@ axios.interceptors.request.use(
43
43
  );
44
44
 
45
45
  const scrubKeys = (err) => {
46
- if (err.request) {
47
- // Scrub the api key in the authorization header
48
- err.request.headers['Authorization'] = `Bearer ********`;
46
+ if (err.request && typeof err.request.headers === 'object' && err.request.headers.Authorization) {
47
+ // Scrub any credentials in the authorization header
48
+ const [type, ...rest] = err.request.headers.Authorization.split(' ');
49
+ err.request.headers.Authorization = rest.length && type
50
+ ? `${type} ********`
51
+ : `********`;
49
52
  }
50
53
  throw err;
51
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polyapi",
3
- "version": "0.23.23",
3
+ "version": "0.23.24",
4
4
  "description": "Poly is a CLI tool to help create and manage your Poly definitions.",
5
5
  "license": "MIT",
6
6
  "repository": {