Skip to content

Fix ZIO issues#1195

Merged
adamw merged 1 commit intosoftwaremill:masterfrom
PawelJ-PL:master
Apr 26, 2021
Merged

Fix ZIO issues#1195
adamw merged 1 commit intosoftwaremill:masterfrom
PawelJ-PL:master

Conversation

@PawelJ-PL
Copy link
Copy Markdown
Contributor

It fixes following issues related to ZIO:

  • By default, errors from failure channel are forwarded to the main entry point (omitting Tapir and Http4s error handling). This causes the server to terminate in the case of an error that is not of type E (e.g. caused by Task(10/0).orDie).
  • Http4sServerOptions is not passed to the next method, but is silently ignored. This causes any changes we make are ignored, instead the default Http4sServerOptions is used.

@adamw
Copy link
Copy Markdown
Member

adamw commented Apr 23, 2021

Thanks! Do you think it would be possible to write maybe even a very basic test for ZServerEndpoint, which would verify that in the logic the errors are properly handled?

@PawelJ-PL
Copy link
Copy Markdown
Contributor Author

I was planning to add tests, but realized that there were no tests in this module. I'll see what the tests look like in other modules and add some.

@adamw
Copy link
Copy Markdown
Member

adamw commented Apr 23, 2021

Time to fix this then! ;-)

@PawelJ-PL
Copy link
Copy Markdown
Contributor Author

Added tests for error handling with ZServerEndpoint

@adamw adamw merged commit dfc8db7 into softwaremill:master Apr 26, 2021
@adamw
Copy link
Copy Markdown
Member

adamw commented Apr 26, 2021

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants