{"record":{"id":"9d22b995a1e11cf2","repo":"beemdevelopment/Aegis","slug":"the-entered-info-is-incorrect","errorCode":null,"errorMessage":"The entered info is incorrect: ","messagePattern":"The entered info is incorrect: ","errorType":"validation","errorClass":"ParseException","httpStatus":null,"severity":"error","filePath":"app/src/main/java/com/beemdevelopment/aegis/ui/EditEntryActivity.java","lineNumber":791,"sourceCode":"                    } catch (NumberFormatException e) {\n                        throw new ParseException(\"Counter is not an integer.\");\n                    }\n                    info = new HotpInfo(secret, algo, digits, counter);\n                    break;\n                case YandexInfo.ID:\n                    info = new YandexInfo(secret, _textPin.getText().toString());\n                    break;\n                case MotpInfo.ID:\n                    info = new MotpInfo(secret, _textPin.getText().toString());\n                    break;\n                default:\n                    throw new RuntimeException(String.format(\"Unsupported OTP type: %s\", type));\n            }\n\n            info.setDigits(digits);\n            info.setAlgorithm(algo);\n        } catch (OtpInfoException e) {\n            throw new ParseException(\"The entered info is incorrect: \" + e.getMessage());\n        }\n\n        VaultEntry entry = Cloner.clone(_origEntry);\n        entry.setInfo(info);\n        entry.setIssuer(_textIssuer.getText().toString());\n        entry.setName(_textName.getText().toString());\n        entry.setNote(_textNote.getText().toString());\n\n        if (_selectedGroups.isEmpty()) {\n            entry.setGroups(new HashSet<>());\n        } else {\n            entry.setGroups(new HashSet<>(_selectedGroups));\n        }\n\n        if (_hasChangedIcon) {\n            if (_hasCustomIcon) {\n                VaultEntryIcon icon;\n                if (_selectedIcon == null) {","sourceCodeStart":773,"sourceCodeEnd":809,"githubUrl":"https://github.com/beemdevelopment/Aegis/blob/d6f4e5925a97e4e91593f1542085eae03432a759/app/src/main/java/com/beemdevelopment/aegis/ui/EditEntryActivity.java#L773-L809","documentation":"After constructing the OtpInfo, EditEntryActivity.parseEntry() calls info.setDigits(digits) and info.setAlgorithm(algo); if the OtpInfo layer rejects these values it throws OtpInfoException, which is wrapped in a ParseException prefixed 'The entered info is incorrect: '. This guards against combinations the OTP implementation cannot use, such as unsupported digit counts or algorithm names.","triggerScenarios":"Saving an entry where setDigits/setAlgorithm fails — e.g. digits outside the allowed range for the OTP type, or an algorithm string not among the supported SHA variants for that OtpInfo class.","commonSituations":"Entering unusual digit counts (e.g. 3 or 20), selecting an algorithm not supported by the chosen OTP type, or an issuer/provider config requiring incompatible parameters.","solutions":["Use a supported digits value (typically 6-8) and a supported algorithm (SHA1/SHA256/SHA512 as offered by the UI dropdowns)","Read the appended OtpInfoException message — it names the exact invalid parameter","Reset the entry's advanced settings to the provider defaults (6 digits, SHA1)"],"exampleFix":"// before\ninfo.setDigits(20); // OtpInfoException: outside allowed range\n// after\ninfo.setDigits(6);","handlingStrategy":"try-catch","validationCode":"int digits = Integer.parseInt(_textDigits.getText().toString());\nif (digits < 6 || digits > 8) {\n    _textDigitsLayout.setError(\"Digits must be 6-8\");\n    return;\n}\nif (!SUPPORTED_ALGOS.contains(_dropdownAlgo.getText().toString())) {\n    _dropdownAlgoLayout.setError(\"Unsupported algorithm\");\n    return;\n}","typeGuard":null,"tryCatchPattern":"try {\n    saveEntry();\n} catch (ParseException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"The entered info is incorrect:\")) {\n        Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n    }\n}","preventionTips":["Restrict digits and algorithm to values offered by the UI dropdowns","Stick to provider defaults (6 digits, SHA1) unless the provider says otherwise","Surface the wrapped OtpInfoException message to identify the exact bad parameter"],"tags":["android","validation","otp","invalid-parameters"],"backgroundTag":"invalid-argument-value","analyzedSha":"d6f4e5925a97e4e91593f1542085eae03432a759","analyzedAt":"2026-09-08T00:46:31.111Z","contentChangedAt":"2026-09-08T00:46:31.111Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}