Files
tasks/chasm/errors.go
T
Yichao YangandGitHub 10b49b3705 CHASM: implement UseExisting ID conflict policy (#8544)
## What changed?
- Implement ID conflict policy UseExisting
- Introduce chasm.ExecutionAlreadyStartedError, same semantic as
serviceerror.WorkflowExecutionAlreadyStarted.

## Why?
- UseExisting conflict will be used by components we are building.

## How did you test it?
- [x] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [x] added new unit test(s)
- [x] added new functional test(s)
2025-11-18 22:43:00 -08:00

22 lines
477 B
Go

package chasm
type ExecutionAlreadyStartedError struct {
Message string
CurrentRequestID string
CurrentRunID string
}
func NewExecutionAlreadyStartedErr(
message, currentRequestID, currentRunID string,
) *ExecutionAlreadyStartedError {
return &ExecutionAlreadyStartedError{
Message: message,
CurrentRequestID: currentRequestID,
CurrentRunID: currentRunID,
}
}
func (e *ExecutionAlreadyStartedError) Error() string {
return e.Message
}