Skip to content

Commit

Permalink
Make error code public
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcmz committed Nov 12, 2024
1 parent bbe28ec commit 50b6082
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/Error/FVMError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation

enum FvmErrorCode: Int, CaseIterable {
public enum FvmErrorCode: Int, CaseIterable {
// We use -1 for unknown error in FCL because FVM defines error codes as uint16
// This means we have no risk of collision with FVM error codes
case unknownError = -1
Expand Down
2 changes: 1 addition & 1 deletion Sources/Models/FlowTransaction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public extension Flow {
computationUsed = try container.decode(String.self, forKey: .computationUsed)
}

var errorCode: FvmErrorCode? {
public var errorCode: FvmErrorCode? {
guard !errorMessage.isEmpty else { return nil }
return FvmErrorCode.allCases.first(where: { errorMessage.contains($0.errorTag) })
}
Expand Down

0 comments on commit 50b6082

Please sign in to comment.