{"record":{"id":"bec6a81252a984a9","repo":"quarkusio/quarkus","slug":"runtimeexception-e","errorCode":null,"errorMessage":"RuntimeException(e)","messagePattern":"RuntimeException\\(e\\)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"extensions/funqy/funqy-server-common/runtime/src/main/java/io/quarkus/funqy/runtime/query/BaseObjectReader.java","lineNumber":78,"sourceCode":"                List<Object> propEntry = paramToObject.get(propName);\n                Object obj;\n                Map<String, List<Object>> paramEntries;\n                if (propEntry == null) {\n                    obj = setter.getSetter().create();\n                    paramEntries = new HashMap<>();\n                    propEntry = Arrays.asList(obj, paramEntries);\n                    paramToObject.put(propName, propEntry);\n                    setter.setValue(target, propName, obj);\n                } else {\n                    obj = propEntry.get(0);\n                    paramEntries = (Map<String, List<Object>>) propEntry.get(1);\n                }\n                setter.getSetter().setValue(obj, suffix, value, paramEntries);\n            } else {\n                // throw Exception?\n            }\n        } catch (Exception e) {\n            throw new RuntimeException(e);\n        }\n    }\n\n}\n","sourceCodeStart":60,"sourceCodeEnd":83,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/funqy/funqy-server-common/runtime/src/main/java/io/quarkus/funqy/runtime/query/BaseObjectReader.java#L60-L83","documentation":"BaseObjectReader.setValue() populates an object's field/setter from parsed query data and wraps any exception (from setters, converters, or value readers) into a RuntimeException. The original cause is preserved; look at getCause() for the real failure.","triggerScenarios":"Funqy query-parameter binding where a nested property value can't be set: incompatible value type for the setter, malformed query string, or a setter that throws.","commonSituations":"Passing a query param like ?nested.field=abc where field expects a number; custom setter throwing during conversion; type mismatch between query string and POJO field type.","solutions":["Read the cause chain — the wrapped exception identifies the failing setter or converter","Fix the query string values to match the POJO field types","Adjust the POJO setter to accept the incoming type or add a converter","Null-check or guard setter logic that can throw on edge inputs"],"exampleFix":"// before\npublic void setCount(String count) { this.count = Integer.parseInt(count); } // throws on \"abc\"\n// after\npublic void setCount(String count) {\n    try { this.count = Integer.parseInt(count); } catch (NumberFormatException e) { this.count = 0; }\n}","handlingStrategy":"try-catch","validationCode":"// Pre-validate query values against POJO types before invocation\nObject val = request.getParameter(\"count\");\nif (val != null && !val.toString().matches(\"\\\\d+\"))\n    throw new IllegalArgumentException(\"count must be numeric\");","typeGuard":null,"tryCatchPattern":"try {\n    reader.readValue(obj, queryParams);\n} catch (RuntimeException e) {\n    Throwable cause = e.getCause();\n    log.errorf(cause, \"Query binding failed while setting %s\", cause.getMessage());\n    throw new BadRequestException(\"Invalid query parameters\", e);\n}","preventionTips":["Always inspect getCause() — the wrapper hides the real error","Keep POJO setters tolerant or convert types explicitly","Test query-parameter binding for every function parameter type","Never rely on implicit string-to-number conversion for edge inputs"],"tags":["quarkus","funqy","query-binding","reflection"],"backgroundTag":"wrapped-reflection-exception","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}