tupui / soroban-versioning

Tansu - Soroban Versioning
https://tansu.dev
Other
4 stars 3 forks source link

Error handling from contract in dApp #55

Open tupui opened 2 months ago

tupui commented 2 months ago

The contract defines enum errors

enum Errors {
  UnexpectedError = 0,
  InvalidKey = 1,
  ProjectAlreadyExist = 2,
  UnregisteredMaintainer = 3,
  NoHashFound = 4,
  InvalidDomainError = 5,
  MaintainerNotDomainOwner = 6
}

In some cases it could be better to use this information to do proper error handling (log, flow, etc.)