{"record":{"id":"4c45d734ef24036c","repo":"pinpoint-apm/pinpoint","slug":"unsupported-format","errorCode":null,"errorMessage":"unsupported format","messagePattern":"unsupported format","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"grpc/src/main/java/com/navercorp/pinpoint/grpc/server/HeaderExtractor.java","lineNumber":53,"sourceCode":"    public HeaderExtractor() {\n        this(PinpointConstants.AGENT_ID_MAX_LEN, PinpointConstants.AGENT_NAME_MAX_LEN);\n    }\n\n    public HeaderExtractor(int idMaxLength, int nameMaxLength) {\n        this.idMaxLength = idMaxLength;\n        this.nameMaxLength = nameMaxLength;\n    }\n\n    public long getTime(Metadata headers, Metadata.Key<String> timeKey) {\n        final String timeStr = headers.get(timeKey);\n        if (timeStr == null) {\n            throw new InvalidGrpcHeaderException(timeKey, timeKey.name() + \" header is missing\");\n        }\n        try {\n            // check number format\n            return Long.parseLong(timeStr);\n        } catch (NumberFormatException e) {\n            throw new IllegalArgumentException(\"unsupported format\");\n        }\n    }\n\n    public String getId(Metadata headers, Metadata.Key<String> idKey) {\n        final String id = headers.get(idKey);\n        if (id == null) {\n            throw new InvalidGrpcHeaderException(idKey, idKey.name() + \" header is missing\");\n        }\n        return validateId(id, idKey);\n    }\n\n    public String getName(Metadata headers, Metadata.Key<String> idKey) {\n        return getName(headers, idKey, this.nameMaxLength);\n    }\n\n    public String getName(Metadata headers, Metadata.Key<String> idKey, int maxNameLength) {\n        final String name = headers.get(idKey);\n        if (!StringUtils.isEmpty(name)) {","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/grpc/src/main/java/com/navercorp/pinpoint/grpc/server/HeaderExtractor.java#L35-L71","documentation":"Thrown by HeaderExtractor.getTime when the gRPC timestamp header value cannot be parsed as a long: Long.parseLong fails on the non-numeric timeStr, so the header is present but malformed. This is a validation guard telling the caller the remote peer sent an invalid time header, surfaced as IllegalArgumentException. The input at fault is the time header string; senders must emit epoch-millis as a decimal string, and receivers should treat this as a protocol violation from the client.","triggerScenarios":"Thrown at grpc/src/main/java/com/navercorp/pinpoint/grpc/server/HeaderExtractor.java:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send the header as epoch millis in decimal digits with no whitespace","Reject/fix the misbehaving client sending malformed headers","Add a server-side guard that maps this to INVALID_ARGUMENT with the offending value"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}