FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

Add new error types and standardize error handling on container

Open vladsud opened this issue 7 years ago • 3 comments

There are more unique error cases we want to convey to the app (actual implementations are coming), so I think it's time to add some structure here.

I propose that every error raised on container has a property "containerErrorType" (better names are welcome!) which is enum and contain on of the following:

  • critical "general" error (almost all errors from ContainerRuntime)
  • critical file IO error (all errors from DeltaManager)
  • 429 error
  • service is experiencing issues (similar to above) (NEW)
  • epoch / version error (file has been overwritten) (NEW)
  • can't summarize for a while (NEW, will comes from ContainerRuntime)

I think all errors reaching container should be strongly typed (and contain that piece of information). Ideally nobody should be using container.emit("error") and instead use Container.raiseCriticalError(error). But signatures on both should be strongly typed and if callers are dealing with "unknown" errors, they should convert them to strongly typed error.

And each type can contain specific properties for that type (429 contains retryAfter)

We can make error type a union of all specific error types.

vladsud avatar Nov 11 '19 19:11 vladsud

@rm-1612 - FYI

vladsud avatar Nov 11 '19 19:11 vladsud

@ashwinmayya as FYI

ruchika-m avatar Nov 13 '19 23:11 ruchika-m

PR: https://github.com/microsoft/FluidFramework/pull/589

jatgarg avatar Jan 02 '20 23:01 jatgarg