mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:27:31 +00:00
fix(handler): updated failed events (#7146)
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -15,6 +16,26 @@ import (
|
||||
"github.com/zitadel/zitadel/internal/zerrors"
|
||||
)
|
||||
|
||||
var _ error = (*executionError)(nil)
|
||||
|
||||
type executionError struct {
|
||||
parent error
|
||||
}
|
||||
|
||||
// Error implements error.
|
||||
func (s *executionError) Error() string {
|
||||
return fmt.Sprintf("statement failed: %v", s.parent)
|
||||
}
|
||||
|
||||
func (s *executionError) Is(err error) bool {
|
||||
_, ok := err.(*executionError)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (s *executionError) Unwrap() error {
|
||||
return s.parent
|
||||
}
|
||||
|
||||
func (h *Handler) eventsToStatements(tx *sql.Tx, events []eventstore.Event, currentState *state) (statements []*Statement, err error) {
|
||||
statements = make([]*Statement, 0, len(events))
|
||||
|
||||
|
Reference in New Issue
Block a user