Throw typed errors with a `cause`
Mantenedores costumam responder em até 4 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 42/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- docker, node.js, typescript
Direção de pesquisa
Start by reading the listed wait-strategy, generic-container, bound-ports, and docker-compose-environment files, then trace the 33 new Error(...) sites and existing tests. Define exported error categories with useful fields and preserve existing messages while attaching underlying errors as cause. Done when the main listed failure types are distinguishable by class, retain causes where errors are wrapped, and tests cover the new fields and unchanged messages.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
What happens
Every error created by packages/testcontainers is a plain Error. There are 33 new Error(...) sites and no error subclasses. A caller can only tell failures apart by matching message text:
Log message "..." not received after 60000msURL /health not accessible after 60000msImage "..." does not exist locally and pull policy is "never"No port binding found for :8080/tcpCannot get container "..." as it is not runningFailed to build image
None of them carry a cause, so the underlying Docker or network error is lost when one is wrapped.
Expected
Exported error classes for the main failure categories, with useful fields, so callers and test helpers can branch on them:
- startup timeout (strategy, timeout, container id)
- container exited during startup (exit code)
- image pull or build failure
- missing port binding or unknown container
Underlying errors are attached as cause.
Where
packages/testcontainers/src/wait-strategies/*.tspackages/testcontainers/src/generic-container/*.tspackages/testcontainers/src/utils/bound-ports.tspackages/testcontainers/src/docker-compose-environment/*.ts
Notes
- Java has
ContainerLaunchExceptionandContainerFetchException. - Related: #1506 (container logs in the start error), #1507 (fail the HTTP wait when the container exits), #1508 (build output on a failed build). Typed errors give those a place to put the logs and exit code.
- Keeping the existing messages makes this additive.
Dependencies
- Nothing blocks this. It can start now.
- Linguagem predominante
- TypeScript
- Estrelas
- 2.7k
- Forks
- 290
- Merge médio
- 4d 1h
- PRs com merge (30d)
- 22
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Inclui um Dockerfile ou arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de testcontainers/testcontainers-node
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
testcontainers/testcontainers-node#1673 ·
Mantenedores costumam responder em até 4 dias
-
enhancement minor
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
testcontainers/testcontainers-node#1539 ·
Mantenedores costumam responder em até 4 dias
-
Let `Wait.forListeningPorts()` wait on specific portsTalvez já em andamento @artbom assumiu há 29 dias. Abertaenhancement minor
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
testcontainers/testcontainers-node#1533 ·
Mantenedores costumam responder em até 4 dias
-
enhancement minor
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
testcontainers/testcontainers-node#1531 ·
Mantenedores costumam responder em até 4 dias
-
Export the types used in public method signaturesTalvez já em andamento @artbom assumiu há 29 dias. Abertaenhancement minor
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
testcontainers/testcontainers-node#1528 ·
Mantenedores costumam responder em até 4 dias
Todas as issues de testcontainers/testcontainers-node
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
makecindy/cindy#15342 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
kwitsch/claude-code-plugin-tooling#219 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
-
no-repo-link tool-submission
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 74/100
BraveOPotato/NoSignups#2618 ·
-
enhancement good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100