{"record":{"id":"b36cd2e6e0af8bac","repo":"jruby/jruby","slug":"stream-error-iae-getmessage-b36cd2","errorCode":null,"errorMessage":"stream error: ${iae.getMessage()}","messagePattern":"stream error: (.+?)","errorType":"exception","errorClass":"Zlib::StreamError","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/jruby/ext/zlib/JZlibInflate.java","lineNumber":180,"sourceCode":"             case 1 -> context.tru;\n             case JZlib.Z_DATA_ERROR -> throw RubyZlib.newStreamError(context, \"stream error\");\n             default -> context.fals;\n        };\n    }\n\n    @JRubyMethod(name = \"set_dictionary\")\n    public IRubyObject set_dictionary(ThreadContext context, IRubyObject arg) {\n        try {\n            byte[] tmp = arg.convertToString().getBytes();\n            int ret = flater.setDictionary(tmp, tmp.length);\n            switch (ret) {\n                case JZlib.Z_STREAM_ERROR -> throw RubyZlib.newStreamError(context, \"stream error\");\n                case JZlib.Z_DATA_ERROR -> throw RubyZlib.newDataError(context, \"wrong dictionary\");\n            }\n            run(context, false);\n            return arg;\n        } catch (IllegalArgumentException iae) {\n            throw RubyZlib.newStreamError(context, \"stream error: \" + iae.getMessage());\n        }\n    }\n\n    @JRubyMethod(name = \"inflate\")\n    public IRubyObject inflate(ThreadContext context, IRubyObject string, Block block) {\n        ByteList data = null;\n        if (!string.isNil()) {\n            data = string.convertToString().getByteList();\n        }\n        return inflate(context, data, block);\n    }\n\n    public IRubyObject inflate(ThreadContext context, ByteList str, Block block) {\n        if (str == null) return internalFinish(context, block);\n\n        append(context, str);\n        return flushOutput(context, block);\n    }","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/jruby/jruby/blob/fb650c13e02b5a600fa66384655069d5ec30c362/core/src/main/java/org/jruby/ext/zlib/JZlibInflate.java#L162-L198","documentation":"Error \"stream error: ${iae.getMessage()}\" thrown in jruby/jruby.","triggerScenarios":"Thrown at core/src/main/java/org/jruby/ext/zlib/JZlibInflate.java:180 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["An IllegalArgumentException occurred during inflate. Read the wrapped message and correct the invalid parameter (window bits, dictionary, or buffer)."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fb650c13e02b5a600fa66384655069d5ec30c362","analyzedAt":"2026-08-23T07:18:57.479Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}