Skip to content

Commit

Permalink
Unknown error
Browse files Browse the repository at this point in the history
  • Loading branch information
gagliardetto committed May 27, 2024
1 parent 1eaa293 commit 18da350
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions err.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func getErr(meta any) any {
case *metalatest.TransactionStatusMeta:
switch status := metaValue.Status.(type) {
case *metalatest.Result__Ok:
return nil
return nil // no error
case *metalatest.Result__Err:
switch err_ := status.Value.(type) {
case *metalatest.TransactionError__AccountInUse:
Expand Down Expand Up @@ -163,7 +163,9 @@ func getErr(meta any) any {
case *metalatest.InstructionError__ComputationalBudgetExceeded:
return "ComputationalBudgetExceeded"
default:
return nil
return map[string]any{
"unknown": []any{}, // unknown; could not parse
}
}
}()
return map[string]any{
Expand All @@ -178,7 +180,7 @@ func getErr(meta any) any {
case *metaoldest.TransactionStatusMeta:
switch status := metaValue.Status.(type) {
case *metaoldest.Result__Ok:
return nil
return nil // no error
case *metaoldest.Result__Err:
switch err_ := status.Value.(type) {
case *metaoldest.TransactionError__AccountInUse:
Expand Down Expand Up @@ -276,7 +278,9 @@ func getErr(meta any) any {
case *metaoldest.InstructionError__InvalidError:
return "InvalidError"
default:
return nil
return map[string]any{
"unknown": []any{}, // unknown; could not parse
}
}
}()
return map[string]any{
Expand Down Expand Up @@ -306,11 +310,17 @@ func getErr(meta any) any {
"InvalidProgramForExecution": []any{12},
}
default:
return nil
return map[string]any{
"unknown": []any{}, // unknown; could not parse
}
}
}
default:
return nil
return map[string]any{
"unknown": []any{}, // unknown; could not parse
}
}
return map[string]any{
"unknown": []any{}, // unknown; could not parse
}
return nil
}

0 comments on commit 18da350

Please sign in to comment.