{"record":{"id":"131d142f40226956","repo":"SigNoz/signoz","slug":"codeinvalidinput-131d14","errorCode":"CodeInvalidInput","errorMessage":"saml: invalid email","messagePattern":"saml: invalid email","errorType":"error_code","errorClass":"errors.Error","httpStatus":400,"severity":"error","filePath":"ee/authn/callbackauthn/samlcallbackauthn/authn.go","lineNumber":101,"sourceCode":"\tif err != nil {\n\t\tif errors.As(err, &saml2.ErrVerification{}) {\n\t\t\treturn nil, errors.New(errors.TypeForbidden, errors.CodeForbidden, err.Error())\n\t\t}\n\n\t\tif errors.As(err, &saml2.ErrMissingElement{}) {\n\t\t\treturn nil, errors.New(errors.TypeNotFound, errors.CodeNotFound, err.Error())\n\t\t}\n\n\t\treturn nil, err\n\t}\n\n\tif assertionInfo.WarningInfo.InvalidTime {\n\t\treturn nil, errors.New(errors.TypeForbidden, errors.CodeForbidden, \"saml: expired saml response\")\n\t}\n\n\temail, err := valuer.NewEmail(assertionInfo.NameID)\n\tif err != nil {\n\t\treturn nil, errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, \"saml: invalid email\").WithAdditional(\"The nameID assertion is used to retrieve the email address, please check your IDP configuration and try again.\")\n\t}\n\n\tname := \"\"\n\tif nameAttribute := samlConfig.AttributeMapping.Name; nameAttribute != \"\" {\n\t\tif val := assertionInfo.Values.Get(nameAttribute); val != \"\" {\n\t\t\tname = val\n\t\t}\n\t}\n\n\tvar groups []string\n\tif groupAttribute := samlConfig.AttributeMapping.Groups; groupAttribute != \"\" {\n\t\tgroups = assertionInfo.Values.GetAll(groupAttribute)\n\t}\n\n\trole := \"\"\n\tif roleAttribute := samlConfig.AttributeMapping.Role; roleAttribute != \"\" {\n\t\tif val := assertionInfo.Values.Get(roleAttribute); val != \"\" {\n\t\t\trole = val","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/ee/authn/callbackauthn/samlcallbackauthn/authn.go#L83-L119","documentation":"parseMetricsDuration first tries to interpret the string as a float number of seconds; if that float times 1e9 overflows int64 it returns this overflow error instead of silently wrapping. It guards time.Duration (nanoseconds int64) against values beyond ~292 years.","triggerScenarios":"Passing step= or a duration parameter whose numeric interpretation overflows: extremely large epoch-nanosecond values (e.g. using nanosecond epochs like 1704067200000000000 where seconds are expected), or strings like '1e300' that ParseFloat accepts.","commonSituations":"Sending nanosecond-precision timestamps where second-based durations are expected; unit confusion between ms/s/ns; generated queries multiplying step by a large factor; defensive tests feeding absurd values.","solutions":["Send durations in human Prometheus form ('1h', '5m', '30s') or as modest numeric seconds","Fix unit confusion: divide nanosecond values by 1e9 before sending","Cap/validate duration client-side to something sane (< 292 years) before calling the API"],"exampleFix":"# before\ncurl '.../api/v1/query_range?step=1704067200000000000&...'\n\n# after\ncurl '.../api/v1/query_range?step=60&...'","handlingStrategy":"validation","validationCode":"func validDuration(s string) bool {\n\tif d, err := strconv.ParseFloat(s, 64); err == nil && math.Abs(d) < 9.2e18/1e9 { return true }\n\tif _, err := prommodel.ParseDuration(s); err == nil { return true }\n\treturn false\n}","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Send '5m'/'1h' style durations","Never send nanosecond epochs as step","Divide ns values by 1e9 before sending"],"tags":["signoz","metrics","api-params","duration","overflow","parser"],"backgroundTag":"invalid-duration-format","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}