Skip to content

v3.0.0 — Typed Dapr errors, invokeHttp, sbt build

Latest

Choose a tag to compare

@sideeffffect sideeffffect released this 12 Oct 17:19
9e98db8

Every sidecar error is now a dapr4s exception, service invocation exposes HTTP status and headers, and the build moved to sbt.

Breaking

  • Typed Dapr errors. Every sidecar error now arrives as a subclass of the sealed dapr4s.DaprException. Java SDK exceptions and js.JavaScriptException no longer reach your code. The subclasses:

    • ComponentNotFoundException(componentKind, name)
    • PermissionDeniedException
    • AppUnreachableException(appId)
    • InvokeHttpException(appId, method, status, body)
    • DaprApiException(errorCode)

    Update any catch of io.dapr.exceptions.DaprException. The mapping table is in wiki/dapr/dapr-error-codes.md.

  • Typed invoke throws on non-2xx. It throws InvokeHttpException, the same on JVM and JS. 3xx counts as non-2xx.

  • UnlockStatus.LockBelongsToOthers. Unlocking a lock that another owner holds returns this new case. Before, it returned InternalError. Exhaustive matches need the new case.

  • Scala.js 1.22. dapr4s_sjs1_3 is built with Scala.js 1.22, so consumers need a 1.22 linker.

Features

  • InvokeCapability.invokeHttp. It returns InvokeResponse(status, headers, body) and never throws on status. It takes headers and query parameters.

Build

  • dapr4s builds with sbt instead of scala-cli (PR #42).
    • ScalablyTyped facades are generated inside the build.
    • The scala-cli 1.14.0 pin and the facade and Wasm workaround scripts are gone.
    • Published coordinates are unchanged: com.github.sideeffffect:dapr4s_3 and dapr4s_sjs1_3.

Docs

  • Wasm component proposal. docs/WASM-COMPONENTS-PROPOSAL.md describes how to target WASI components through dapr-wasm-components v0.7.0.
  • Wiki. New articles on the WIT overlap and on Dapr error codes.