impr: Improve network interface error handling

This commit is contained in:
WerWolv
2023-05-16 11:20:46 +02:00
parent a758676b0d
commit 7e9b23de7d
2 changed files with 6 additions and 2 deletions
@@ -6,7 +6,7 @@ namespace hex::plugin::builtin {
void registerNetworkEndpoints() {
ContentRegistry::CommunicationInterface::registerNetworkEndpoint("pattern_editor/set_code", [](const nlohmann::json &data) -> nlohmann::json {
auto code = data["code"].get<std::string>();
auto code = data.at("code").get<std::string>();
EventManager::post<RequestSetPatternLanguageCode>(code);