Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default error handler example - converts every error to Error case class and sends jsonBody #4266

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Fixed type, some comments too

c862d9e
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Open

Default error handler example - converts every error to Error case class and sends jsonBody #4266

Fixed type, some comments too
c862d9e
Select commit
Loading
Failed to load commit list.
GitHub Actions / Test report for 2.13-JS-11 succeeded Jan 15, 2025 in 1s

483 passed, 0 failed and 0 skipped

Tests passed successfully

Report Passed Failed Skipped Time
client/sttp-client/target/js-2.13/test-reports/TEST-sttp.tapir.client.sttp.SttpClientBasicTests.xml 57✅ 461ms
client/sttp-client/target/js-2.13/test-reports/TEST-sttp.tapir.client.sttp.SttpClientMultipartTests.xml 3✅ 271ms
client/sttp-client/target/js-2.13/test-reports/TEST-sttp.tapir.client.sttp.SttpClientRequestTests.xml 3✅ 10ms
client/sttp-client/target/js-2.13/test-reports/TEST-sttp.tapir.client.sttp.SttpClientWebSocketZioTests.xml 3✅ 316ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.annotations.DeriveEndpointIOTest.xml 30✅ 9ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.AttributeTest.xml 3✅ 1ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.CodecDelimitedTest.xml 2✅ 2ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.CodecTest.xml 6✅ 107ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.EndpointTest.xml 76✅ 19ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.generic.EnumsCodecDerivationTest.xml 4✅ 1ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.generic.FormCodecDerivationTest.xml 14✅ 15ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.generic.LegacySchemaGenericAutoTest.xml 8✅ 20ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.generic.MultipartCodecDerivationTest.xml 13✅ 73ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.generic.SchemaGenericAutoTest.xml 29✅ 11ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.generic.ValueClassCodecDerivationTest.xml 1✅ 3ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.internal.RichEndpointInputTest.xml 5✅ 0ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.internal.RichEndpointOutputTest.xml 1✅ 1ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.internal.UrlencodedDataTest.xml 4✅ 1ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.LegacySchemaApplyValidationTest.xml 1✅ 3ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.namespacing.SchemaMacroNamespaceTest.xml 2✅ 8ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.SchemaAnnotationsTest.xml 1✅ 0ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.SchemaApplyValidationTest.xml 13✅ 227ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.SchemaMacroTest.xml 26✅ 12ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.SchemaMacroTest2.xml 5✅ 4ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.SchemaTest.xml 13✅ 8ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.typelevel.MatchTypeTest.xml 8✅ 4ms
core/target/js-2.13/test-reports/TEST-sttp.tapir.ValidatorTest.xml 28✅ 4ms
integrations/cats/target/js-2.13/test-reports/TEST-sttp.tapir.integ.cats.EndpointIOInstancesSpec.xml 3✅ 0ms
integrations/cats/target/js-2.13/test-reports/TEST-sttp.tapir.integ.cats.ExampleFunctorLawSpec.xml 5✅ 22ms
integrations/cats/target/js-2.13/test-reports/TEST-sttp.tapir.integ.cats.ModifyFunctorInstancesTest.xml 4✅ 5ms
integrations/cats/target/js-2.13/test-reports/TEST-sttp.tapir.integ.cats.TapirCodecCatsTest.xml 22✅ 138ms
integrations/cats/target/js-2.13/test-reports/TEST-sttp.tapir.integ.cats.ValidatorCatsTest.xml 3✅ 1ms
integrations/enumeratum/target/js-2.13/test-reports/TEST-sttp.tapir.codec.enumeratum.TapirCodecEnumeratumTest.xml 5✅ 13ms
integrations/newtype/target/js-2.13/test-reports/TEST-sttp.tapir.codec.newtype.TapirCodecNewTypeTest.xml 6✅ 4ms
json/jsoniter/target/js-2.13/test-reports/TEST-sttp.tapir.json.jsoniter.TapirJsonJsoniterTests.xml 1✅ 4ms
json/playjson/target/js-2.13/test-reports/TEST-sttp.tapir.json.play.TapirJsonPlayTests.xml 9✅ 11ms
json/upickle/target/js-2.13/test-reports/TEST-sttp.tapir.json.upickle.TapirJsonuPickleTests.xml 5✅ 6ms
json/zio/target/js-2.13/test-reports/TEST-sttp.tapir.json.zio.TapirJsonZioTest.xml 8✅ 8ms
server/core/target/js-2.13/test-reports/TEST-sttp.tapir.server.interceptor.cors.CORSConfigTest.xml 2✅ 0ms
server/core/target/js-2.13/test-reports/TEST-sttp.tapir.server.interceptor.cors.CORSInterceptorTest.xml 2✅ 1ms
server/core/target/js-2.13/test-reports/TEST-sttp.tapir.server.interceptor.decodefailure.DefaultDecodeFailureHandlerTest.xml 5✅ 2ms
server/core/target/js-2.13/test-reports/TEST-sttp.tapir.server.interpreter.DecodeBasicInputsTest.xml 1✅ 1ms
server/core/target/js-2.13/test-reports/TEST-sttp.tapir.server.interpreter.FilterServerEndpointsTest.xml 9✅ 9ms
server/core/target/js-2.13/test-reports/TEST-sttp.tapir.server.interpreter.ServerInterpreterTest.xml 3✅ 9ms
testing/target/js-2.13/test-reports/TEST-sttp.tapir.testing.EndpointVerifierTest.xml 31✅ 37ms

✅ client/sttp-client/target/js-2.13/test-reports/TEST-sttp.tapir.client.sttp.SttpClientBasicTests.xml

57 tests were completed in 461ms with 57 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.client.sttp.SttpClientBasicTests 57✅ 461ms

✅ client/sttp-client/target/js-2.13/test-reports/TEST-sttp.tapir.client.sttp.SttpClientMultipartTests.xml

3 tests were completed in 271ms with 3 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.client.sttp.SttpClientMultipartTests 3✅ 271ms

✅ client/sttp-client/target/js-2.13/test-reports/TEST-sttp.tapir.client.sttp.SttpClientRequestTests.xml

3 tests were completed in 10ms with 3 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.client.sttp.SttpClientRequestTests 3✅ 10ms

✅ client/sttp-client/target/js-2.13/test-reports/TEST-sttp.tapir.client.sttp.SttpClientWebSocketZioTests.xml

3 tests were completed in 316ms with 3 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.client.sttp.SttpClientWebSocketZioTests 3✅ 316ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.annotations.DeriveEndpointIOTest.xml

30 tests were completed in 9ms with 30 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.annotations.DeriveEndpointIOTest 30✅ 9ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.AttributeTest.xml

3 tests were completed in 1ms with 3 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.AttributeTest 3✅ 1ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.CodecDelimitedTest.xml

2 tests were completed in 2ms with 2 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.CodecDelimitedTest 2✅ 2ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.CodecTest.xml

6 tests were completed in 107ms with 6 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.CodecTest 6✅ 107ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.EndpointTest.xml

76 tests were completed in 19ms with 76 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.EndpointTest 76✅ 19ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.generic.EnumsCodecDerivationTest.xml

4 tests were completed in 1ms with 4 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.generic.EnumsCodecDerivationTest 4✅ 1ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.generic.FormCodecDerivationTest.xml

14 tests were completed in 15ms with 14 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.generic.FormCodecDerivationTest 14✅ 15ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.generic.LegacySchemaGenericAutoTest.xml

8 tests were completed in 20ms with 8 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.generic.LegacySchemaGenericAutoTest 8✅ 20ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.generic.MultipartCodecDerivationTest.xml

13 tests were completed in 73ms with 13 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.generic.MultipartCodecDerivationTest 13✅ 73ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.generic.SchemaGenericAutoTest.xml

29 tests were completed in 11ms with 29 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.generic.SchemaGenericAutoTest 29✅ 11ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.generic.ValueClassCodecDerivationTest.xml

1 tests were completed in 3ms with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.generic.ValueClassCodecDerivationTest 1✅ 3ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.internal.RichEndpointInputTest.xml

5 tests were completed in 0ms with 5 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.internal.RichEndpointInputTest 5✅ 0ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.internal.RichEndpointOutputTest.xml

1 tests were completed in 1ms with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.internal.RichEndpointOutputTest 1✅ 1ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.internal.UrlencodedDataTest.xml

4 tests were completed in 1ms with 4 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.internal.UrlencodedDataTest 4✅ 1ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.LegacySchemaApplyValidationTest.xml

1 tests were completed in 3ms with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.LegacySchemaApplyValidationTest 1✅ 3ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.namespacing.SchemaMacroNamespaceTest.xml

2 tests were completed in 8ms with 2 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.namespacing.SchemaMacroNamespaceTest 2✅ 8ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.SchemaAnnotationsTest.xml

1 tests were completed in 0ms with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.SchemaAnnotationsTest 1✅ 0ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.SchemaApplyValidationTest.xml

13 tests were completed in 227ms with 13 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.SchemaApplyValidationTest 13✅ 227ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.SchemaMacroTest.xml

26 tests were completed in 12ms with 26 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.SchemaMacroTest 26✅ 12ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.SchemaMacroTest2.xml

5 tests were completed in 4ms with 5 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.SchemaMacroTest2 5✅ 4ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.SchemaTest.xml

13 tests were completed in 8ms with 13 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.SchemaTest 13✅ 8ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.typelevel.MatchTypeTest.xml

8 tests were completed in 4ms with 8 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.typelevel.MatchTypeTest 8✅ 4ms

✅ core/target/js-2.13/test-reports/TEST-sttp.tapir.ValidatorTest.xml

28 tests were completed in 4ms with 28 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.ValidatorTest 28✅ 4ms

✅ integrations/cats/target/js-2.13/test-reports/TEST-sttp.tapir.integ.cats.EndpointIOInstancesSpec.xml

3 tests were completed in 0ms with 3 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.integ.cats.EndpointIOInstancesSpec 3✅ 0ms

✅ integrations/cats/target/js-2.13/test-reports/TEST-sttp.tapir.integ.cats.ExampleFunctorLawSpec.xml

5 tests were completed in 22ms with 5 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.integ.cats.ExampleFunctorLawSpec 5✅ 22ms

✅ integrations/cats/target/js-2.13/test-reports/TEST-sttp.tapir.integ.cats.ModifyFunctorInstancesTest.xml

4 tests were completed in 5ms with 4 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.integ.cats.ModifyFunctorInstancesTest 4✅ 5ms

✅ integrations/cats/target/js-2.13/test-reports/TEST-sttp.tapir.integ.cats.TapirCodecCatsTest.xml

22 tests were completed in 138ms with 22 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.integ.cats.TapirCodecCatsTest 22✅ 138ms

✅ integrations/cats/target/js-2.13/test-reports/TEST-sttp.tapir.integ.cats.ValidatorCatsTest.xml

3 tests were completed in 1ms with 3 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.integ.cats.ValidatorCatsTest 3✅ 1ms

✅ integrations/enumeratum/target/js-2.13/test-reports/TEST-sttp.tapir.codec.enumeratum.TapirCodecEnumeratumTest.xml

5 tests were completed in 13ms with 5 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.codec.enumeratum.TapirCodecEnumeratumTest 5✅ 13ms

✅ integrations/newtype/target/js-2.13/test-reports/TEST-sttp.tapir.codec.newtype.TapirCodecNewTypeTest.xml

6 tests were completed in 4ms with 6 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.codec.newtype.TapirCodecNewTypeTest 6✅ 4ms

✅ json/jsoniter/target/js-2.13/test-reports/TEST-sttp.tapir.json.jsoniter.TapirJsonJsoniterTests.xml

1 tests were completed in 4ms with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.json.jsoniter.TapirJsonJsoniterTests 1✅ 4ms

✅ json/playjson/target/js-2.13/test-reports/TEST-sttp.tapir.json.play.TapirJsonPlayTests.xml

9 tests were completed in 11ms with 9 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.json.play.TapirJsonPlayTests 9✅ 11ms

✅ json/upickle/target/js-2.13/test-reports/TEST-sttp.tapir.json.upickle.TapirJsonuPickleTests.xml

5 tests were completed in 6ms with 5 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.json.upickle.TapirJsonuPickleTests 5✅ 6ms

✅ json/zio/target/js-2.13/test-reports/TEST-sttp.tapir.json.zio.TapirJsonZioTest.xml

8 tests were completed in 8ms with 8 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.json.zio.TapirJsonZioTest 8✅ 8ms

✅ server/core/target/js-2.13/test-reports/TEST-sttp.tapir.server.interceptor.cors.CORSConfigTest.xml

2 tests were completed in 0ms with 2 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.server.interceptor.cors.CORSConfigTest 2✅ 0ms

✅ server/core/target/js-2.13/test-reports/TEST-sttp.tapir.server.interceptor.cors.CORSInterceptorTest.xml

2 tests were completed in 1ms with 2 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.server.interceptor.cors.CORSInterceptorTest 2✅ 1ms

✅ server/core/target/js-2.13/test-reports/TEST-sttp.tapir.server.interceptor.decodefailure.DefaultDecodeFailureHandlerTest.xml

5 tests were completed in 2ms with 5 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.server.interceptor.decodefailure.DefaultDecodeFailureHandlerTest 5✅ 2ms

✅ server/core/target/js-2.13/test-reports/TEST-sttp.tapir.server.interpreter.DecodeBasicInputsTest.xml

1 tests were completed in 1ms with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.server.interpreter.DecodeBasicInputsTest 1✅ 1ms

✅ server/core/target/js-2.13/test-reports/TEST-sttp.tapir.server.interpreter.FilterServerEndpointsTest.xml

9 tests were completed in 9ms with 9 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.server.interpreter.FilterServerEndpointsTest 9✅ 9ms

✅ server/core/target/js-2.13/test-reports/TEST-sttp.tapir.server.interpreter.ServerInterpreterTest.xml

3 tests were completed in 9ms with 3 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.server.interpreter.ServerInterpreterTest 3✅ 9ms

✅ testing/target/js-2.13/test-reports/TEST-sttp.tapir.testing.EndpointVerifierTest.xml

31 tests were completed in 37ms with 31 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.testing.EndpointVerifierTest 31✅ 37ms