chrome-webstore-upload 5.0.0-3 → 5.0.0-4

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.
@@ -2,4 +2,4 @@ export declare class CWSError extends Error {
2
2
  cause: unknown;
3
3
  name: string;
4
4
  }
5
- export declare function throwIfNotOk(request: Response, response: unknown): void;
5
+ export declare function throwIfNotOk(request: Response, response: Record<string, unknown>): void;
@@ -28,7 +28,8 @@ export function throwIfNotOk(request, response) {
28
28
  if (!request.ok) {
29
29
  const message = parseErrorMessage(response);
30
30
  const error = new CWSError(message);
31
- error.cause = response;
31
+ // https://github.com/fregante/chrome-webstore-upload/issues/117
32
+ error.cause = 'error' in response ? response['error'] : response;
32
33
  throw error;
33
34
  }
34
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chrome-webstore-upload",
3
- "version": "5.0.0-3",
3
+ "version": "5.0.0-4",
4
4
  "description": "Upload Chrome Extensions to the Chrome Web Store",
5
5
  "keywords": [
6
6
  "chrome",