|
@@ -437,7 +437,16 @@ func transactionHandler(ctx context.Context, action string) (err *errs.Error) {
|
|
|
case "commit":
|
|
|
operation = func() error { return contextSession.CommitTransaction(contextSession) }
|
|
|
}
|
|
|
+
|
|
|
+ defer func () {
|
|
|
+ if localErr != nil {
|
|
|
+ err = errs.Internal().Details(&errs.Detail{
|
|
|
+ Message: localErr.Error(),
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }()
|
|
|
try := 4
|
|
|
+
|
|
|
for {
|
|
|
if localErr = operation(); localErr == nil {
|
|
|
fmt.Println(action, "executed ")
|
|
@@ -459,13 +468,6 @@ func transactionHandler(ctx context.Context, action string) (err *errs.Error) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- if localErr != nil {
|
|
|
- err = errs.Internal().Details(&errs.Detail{
|
|
|
- Message: localErr.Error(),
|
|
|
- })
|
|
|
- }
|
|
|
- return
|
|
|
}
|
|
|
|
|
|
func ReadJson(ctx context.Context, entity interface{}) (err *errs.Error) {
|