Skip to content

Commit 779c159

Browse files
authored
chore(test-registry): Add more descriptive error code for common error (#16790)
The error code 137 is a very common error when running E2E tests. Starting colima only with `colima start` often results in too little memory and it makes sense to add a more descriptive message here. To make it work with Colima, it's better to start it with `colima start --cpu 10 --memory 12 --network-address`
1 parent 6116610 commit 779c159

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

dev-packages/e2e-tests/registrySetup.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,15 @@ export function registrySetup(): void {
8585
},
8686
);
8787

88-
if (publishImageContainerRunProcess.status !== 0) {
89-
throw new Error('Publish Image Container failed.');
88+
const statusCode = publishImageContainerRunProcess.status;
89+
90+
if (statusCode !== 0) {
91+
if (statusCode === 137) {
92+
throw new Error(
93+
`Publish Image Container failed with exit code ${statusCode}, possibly due to memory issues. Consider increasing the memory limit for the container.`,
94+
);
95+
}
96+
throw new Error(`Publish Image Container failed with exit code ${statusCode}`);
9097
}
9198
});
9299

0 commit comments

Comments
 (0)