← All Reports

Report #11

Project: Lenci V0.2.0 R1

2026-02-28 20:46:30

#11 2026-02-28 20:46:30

Description

Issue Description When generating a package, the request fails with a backend error: ❌ UsageService RPC failed: invalid input syntax for type integer: "1.08" This indicates the package-generation flow is sending a decimal string value ("1.08") into a field/argument that the RPC (and underlying database type) expects to be an integer. As a result, the usage/credit calculation step crashes before generation can proceed. Expected Behavior Package generation should succeed when the user has sufficient credits, and the usage/credits RPC should receive correctly typed numeric inputs (integers for integer fields). If fractional credits/pricing are supported, they should be handled using a compatible numeric type (e.g., decimal) and never passed into integer-only parameters. Acceptance Criteria Generating a package does not throw invalid input syntax for type integer for any numeric value. The usage/credits RPC accepts and processes the package cost consistently: If the system uses integer credits: all package costs are converted/rounded deterministically before calling the RPC (no decimal strings). If the system supports fractional credits: the RPC/database types support decimals and the UI/backend send a numeric decimal type (not an integer field). The same package can be generated repeatedly (when credits allow) without intermittent type errors. The UI displays a clear, correct error only when there is a real business rule failure (e.g., insufficient credits), not a type mismatch. Logs for the failing call include the payload fields and confirm the numeric field is sent as the correct type (number) and expected scale (integer or decimal).

Console Output

api-DnxV09yk.js:1  POST https://test-lenci.siyadatech.studio/api/packages/generate 500 (Internal Server Error)
tt @ api-DnxV09yk.js:1
await in tt
generatePackage @ main-CWxUIURF.js:9590
onClick @ main-CWxUIURF.js:9777
Mf @ LanguageContext-D5j2HYtZ.js:48
(anonymous) @ LanguageContext-D5j2HYtZ.js:48
Iu @ LanguageContext-D5j2HYtZ.js:48
gc @ LanguageContext-D5j2HYtZ.js:48
Dc @ LanguageContext-D5j2HYtZ.js:49
dv @ LanguageContext-D5j2HYtZ.js:49
main-CWxUIURF.js:9878 [generatePackage] Package generation failed: {status: 500, statusText: '', error: 'server_error', message: 'UsageService RPC failed: invalid input syntax for type integer: "1.08"', details: undefined, …}
DIe.console.error @ main-CWxUIURF.js:9878
generatePackage @ main-CWxUIURF.js:9590
await in generatePackage
onClick @ main-CWxUIURF.js:9777
Mf @ LanguageContext-D5j2HYtZ.js:48
(anonymous) @ LanguageContext-D5j2HYtZ.js:48
Iu @ LanguageContext-D5j2HYtZ.js:48
gc @ LanguageContext-D5j2HYtZ.js:48
Dc @ LanguageContext-D5j2HYtZ.js:49
dv @ LanguageContext-D5j2HYtZ.js:49

Screenshots & Video