{"record":{"id":"58af285a74fd6dfe","repo":"iflytek/astron-agent","slug":"params-error","errorCode":"PARAMS_ERROR","errorMessage":"PARAMS_ERROR","messagePattern":"PARAMS_ERROR","errorType":"exception","errorClass":"BusinessException","httpStatus":null,"severity":"warning","filePath":"console/backend/hub/src/main/java/com/iflytek/astron/console/hub/controller/chat/ChatListController.java","lineNumber":81,"sourceCode":"        setDefaultChatListName(payload);\n        Integer botId = validateBotId(payload.getBotId());\n        validateBotPermissions(botId, uid);\n        return ApiResult.success(chatListService.createChatList(uid, payload.getChatListName(), botId));\n    }\n\n    /**\n     * Delete chat list\n     *\n     * @param payload Request body containing chat list ID\n     * @return Result of the delete operation\n     */\n    @PostMapping(\"/v1/del-chat-list\")\n    @Operation(summary = \"Delete Chat List\")\n    public ApiResult<Boolean> deleteChatList(\n            @RequestBody ChatListDelRequest payload) {\n        String uid = RequestContextUtil.getUID();\n        if (payload.getChatListId() == null) {\n            throw new BusinessException(ResponseEnum.PARAMS_ERROR);\n        }\n        Long chatListId = payload.getChatListId();\n\n        return ApiResult.success(chatListService.logicDeleteChatList(chatListId, uid));\n    }\n\n    /**\n     * Get bot information.\n     *\n     * @param request HTTP request object\n     * @param botId Bot ID\n     * @param workflowVersion Optional workflow version parameter\n     * @return ApiResult object containing bot information\n     */\n    @GetMapping(\"/v1/get-bot-info\")\n    @Operation(summary = \"Get Bot Information\")\n    public ApiResult<BotInfoDto> getBotInfo(HttpServletRequest request, Integer botId, @RequestParam(required = false) String workflowVersion) {\n        String uid = RequestContextUtil.getUID();","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/console/backend/hub/src/main/java/com/iflytek/astron/console/hub/controller/chat/ChatListController.java#L63-L99","documentation":"PARAMS_ERROR is thrown by ChatListController.deleteChatList when the request body has a null chatListId. The endpoint /v1/del-chat-list requires chatListId to identify which chat list entry to logically delete, and rejects the request before any service call.","triggerScenarios":"POST /v1/del-chat-list with body {} or {\"chatListId\": null}; wrong field name in the JSON (e.g. chatId instead of chatListId) that deserializes to null; sending form data instead of JSON so the @RequestBody field stays null.","commonSituations":"Frontend submitting the delete form before a chat is selected; API consumers using a mis-documented payload key; content-type not application/json causing empty deserialization.","solutions":["Include a non-null chatListId in the JSON body","Fix the field name to match ChatListDelRequest (chatListId)","Ensure Content-Type: application/json on the request","Guard in the client: only call delete after a chatListId is selected"],"exampleFix":"// before\nPOST /v1/del-chat-list\n{ \"chatId\": 5 }\n// after\nPOST /v1/del-chat-list\n{ \"chatListId\": 5 }","handlingStrategy":"validation","validationCode":"if (payload.chatListId == null) throw new Error('chatListId is required');","typeGuard":"const isDeletable = (p) => p != null && Number.isInteger(p.chatListId);","tryCatchPattern":"try { await delChatList(payload); } catch (e) { if (e.code === 'PARAMS_ERROR') { console.warn('chatListId missing, select a chat first'); } else throw e; }","preventionTips":["Disable the delete button until a chatListId is selected","Use the exact field name chatListId from ChatListDelRequest","Send JSON with Content-Type: application/json","Add a shared request schema check for delete payloads"],"tags":["validation","missing-argument","request-body"],"backgroundTag":"missing-required-argument","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}