Skip to content

Commit 6312ffa

Browse files
authored
Merge pull request #9 from fingerprintjs/feat/file-read-original-error
This update adds original error message when ios podspec file read throws unexpected error.
2 parents 42778a6 + 1eb17df commit 6312ffa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/platforms/iOS.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const resolve = async (
4444
case 'EACCES':
4545
throw new Error(`${podSpecJsonPath} file cannot be accessed.`)
4646
default:
47-
throw new Error(`${podSpecJsonPath} file cannot be read.`)
47+
throw new Error(`${podSpecJsonPath} file cannot be read. Error: ${error.message}`)
4848
}
4949
}
5050

test/__snapshots__/iOS.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ exports[`Test for iOS platform throws error when file not found: podspecFileNotF
44

55
exports[`Test for iOS platform throws error when file not readable: podspecNotReadable 1`] = `"not-readable.podspec.json file cannot be accessed."`;
66

7-
exports[`Test for iOS platform throws error when path is a directory: podspecPathIsDirectory 1`] = `"test file cannot be read."`;
7+
exports[`Test for iOS platform throws error when path is a directory: podspecPathIsDirectory 1`] = `"test file cannot be read. Error: EISDIR: illegal operation on a directory, read"`;

0 commit comments

Comments
 (0)