Comments (2)
@Framstag Should be fixed. Please test and confirm.
from xoom-common.
Updates to current master via bintray...
Modified example as follows:
private fun getUser(id: String): Completes<Response> {
val userId = UserId.from(id)
logger.info("Loading user $userId...")
return stage.maybeActorOf(IUser::class.java,addressFactory.from(userId.toString()))
.andThen {
maybeUser ->
logger.info("Return Response.Status.Ok")
if (maybeUser.isEmpty) {
throw Exception("Not found")
}
Response.of(Response.Status.Ok, serialized(maybeUser.orElse(null)))
}
.recoverFrom {
e ->
logger.error("Error:",e)
logger.warn("Return Response.Status.NotFound: " + e.message)
Response.of(Response.Status.NotFound) // Response
}
}
Exception is caught and printed as expected. Analysed code in debugger. Exception is stored during andThen() and later on handled during recoverFrom() call.
Rest call though does not return (curl is hanging).
from xoom-common.
Related Issues (11)
- Completes.recoverFrom() should support a handler that returns a Completes<Y> not just Y
- Support for composition of Completes
- Support Completes<T> and CompletableFuture<T> In One Pipeline
- Redesign Completes<T> so it decouples composition and execution time HOT 5
- failedOutcomeValue ignored if chained with multiple AndThen statements HOT 8
- moved to trello
- Set up publishing snapshot builds to bintray HOT 1
- DynaFile is coupled to Maven. HOT 11
- please update vlingo-common in repository HOT 2
- Completes with map and flatmap HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xoom-common.