You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
adding @ContinueSpan annotation prevents the propagation of expected exception
throwing 500-internal Server Error instead
the thrown exception is Unexpected error occurred: class io.micronaut.core.async.publisher.Publishers$JustThrowPublisher cannot be cast to class io.reactivex.Flowable (io.micronaut.core.async.publisher.Publishers$JustThrowPublisher and io.reactivex.Flowable are in unnamed module of loader 'app') java.lang.ClassCastException: class io.micronaut.core.async.publisher.Publishers$JustThrowPublisher cannot be cast to class io.reactivex.Flowable (io.micronaut.core.async.publisher.Publishers$JustThrowPublisher and io.reactivex.Flowable are in unnamed module of loader 'app')
is there a way to trace endpoints returning Flowable ?
Steps To Reproduce
Clone micronaut "Hello world" example project
Add endpoint returning Flowable<> type
@Controller("/hello")
public class HelloController {
@Get
@Produces(MediaType.TEXT_PLAIN)
public String index() {
return "Hello World";
}
@Get("/err")
@ContinueSpan
public Flowable<String> flowable() {
try{
throwException();
}catch (Exception e){
return Flowable.error(e);
}
return Flowable.just("example value");
}
private void throwException(){
throw new HttpStatusException(HttpStatus.BAD_REQUEST,"wrong isolation");
}
}
Call endpoint "/err"
Environment Information
JDK 11
Example Application
No response
Version
2.5.13, 3.6.3
The text was updated successfully, but these errors were encountered:
Roodek
changed the title
Annotating endpoints returning Flowable<> type in case of any exception always throws 500
Annotating endpoints returning Flowable<> type with @ContinueSpan in case of any exception always throws 500
Sep 21, 2022
Roodek
changed the title
Annotating endpoints returning Flowable<> type with @ContinueSpan in case of any exception always throws 500
Annotating endpoints returning Flowable<> type with @ContinueSpan in case of any exception always throws ClassCastException
Oct 10, 2022
Have similar issue in my reactive app -- my async service annotated with @ContinueSpan just fails with:
java.lang.ClassCastException: class io.micronaut.core.async.publisher.Publishers$JustThrowPublisher cannot be cast to class reactor.core.publisher.Mono (io.micronaut.core.async.publisher.Publishers$JustThrowPublisher and reactor.core.publisher.Mono are in unnamed module of loader 'app')
at ru.tinkoff.dwh.hercule.we.executor.$WorkspaceExecutorImpl$Definition$Intercepted.execute(Unknown Source)
Expected Behavior
throwing expected exception 400 - Bad request
Actual Behaviour
adding @ContinueSpan annotation prevents the propagation of expected exception
throwing 500-internal Server Error instead
the thrown exception is
Unexpected error occurred: class io.micronaut.core.async.publisher.Publishers$JustThrowPublisher cannot be cast to class io.reactivex.Flowable (io.micronaut.core.async.publisher.Publishers$JustThrowPublisher and io.reactivex.Flowable are in unnamed module of loader 'app') java.lang.ClassCastException: class io.micronaut.core.async.publisher.Publishers$JustThrowPublisher cannot be cast to class io.reactivex.Flowable (io.micronaut.core.async.publisher.Publishers$JustThrowPublisher and io.reactivex.Flowable are in unnamed module of loader 'app')
is there a way to trace endpoints returning Flowable ?
Steps To Reproduce
Environment Information
JDK 11
Example Application
No response
Version
2.5.13, 3.6.3
The text was updated successfully, but these errors were encountered: