Skip to content

Commit

Permalink
Merge pull request #755 from andyczerwonka/patch-1
Browse files Browse the repository at this point in the history
wordsmith type-erasure issue with status mappings
  • Loading branch information
adamw authored Sep 18, 2020
2 parents 8a1bc16 + 056cc29 commit 1077b5d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions doc/endpoint/statuscodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ dynamically assembled (e.g. using a default set of cases, plus endpoint-specific

## Status mapping and type erasure

Sometime at runtime status mapping resolution can not work properly because of type erasure.
For example this code will fail at compile time; because of type erasure `Right[NotFound]` and `Right[BadRequest]` will
become `Right[Any]`, therefore the code would not be able to find the correct mapping for a value:
Type erasure may prevent a status mapping from working properly. The following example will fail at compile time because `Right[NotFound]` and `Right[BadRequest]` will become `Right[Any]`:

```scala mdoc:fail
import sttp.tapir._
Expand Down

0 comments on commit 1077b5d

Please sign in to comment.