diff --git a/src/de/tudbut/tryumph/server/BrowserContext.java b/src/de/tudbut/tryumph/server/BrowserContext.java index 6e091bb..88bad83 100644 --- a/src/de/tudbut/tryumph/server/BrowserContext.java +++ b/src/de/tudbut/tryumph/server/BrowserContext.java @@ -34,11 +34,7 @@ public class BrowserContext { private BrowserContext(String cookie, IRequestCatcher requestCatcher) { this.requestCatcher = requestCatcher; - try { - data = AsyncJSON.read(cookie).err(e -> {throw new RuntimeException(e);}).ok().await(); - } catch (Exception e) { - data = new TCN("JSON"); - } + AsyncJSON.read(cookie).then(x -> data = x).err(e -> data = new TCN("json")).ok().await(); } public static Task create(IRequestCatcher requestCatcher) {