Variant

secrets-error

An error type that encapsulates the different errors that can occur fetching secrets

variant secrets-error {
  upstream(string),
  io(string),
  not-found,
}

Cases

CasePayloadDescription
upstreamstringThis indicates an error from an "upstream" secrets source. As this could be almost anything (such as Vault, Kubernetes Secrets, KeyValue buckets, etc), the error message is a string.
iostringThis indicates an error from an I/O operation. As this could be almost anything (such as a file read, network connection, etc), the error message is a string. Depending on how this ends up being consumed, we may consider moving this to use the wasi:io/error type instead. For simplicity right now in supporting multiple implementations, it is being left as a string.
not-foundThis indicates that the requested secret was not found.