iflytek/astron-agent · warning · BusinessException
PARAMS_ERROR
PARAMS_ERROR
Error message
PARAMS_ERROR
What it means
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.
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
Example fix
// before
POST /v1/del-chat-list
{ "chatId": 5 }
// after
POST /v1/del-chat-list
{ "chatListId": 5 } Defensive patterns
Strategy: validation
Validate before calling
if (payload.chatListId == null) throw new Error('chatListId is required'); Type guard
const isDeletable = (p) => p != null && Number.isInteger(p.chatListId);
Try / catch
try { await delChatList(payload); } catch (e) { if (e.code === 'PARAMS_ERROR') { console.warn('chatListId missing, select a chat first'); } else throw e; } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/58af285a74fd6dfe.
Report an issue: GitHub.
Appendix: source
Thrown at console/backend/hub/src/main/java/com/iflytek/astron/console/hub/controller/chat/ChatListController.java:81
setDefaultChatListName(payload);
Integer botId = validateBotId(payload.getBotId());
validateBotPermissions(botId, uid);
return ApiResult.success(chatListService.createChatList(uid, payload.getChatListName(), botId));
}
/**
* Delete chat list
*
* @param payload Request body containing chat list ID
* @return Result of the delete operation
*/
@PostMapping("/v1/del-chat-list")
@Operation(summary = "Delete Chat List")
public ApiResult<Boolean> deleteChatList(
@RequestBody ChatListDelRequest payload) {
String uid = RequestContextUtil.getUID();
if (payload.getChatListId() == null) {
throw new BusinessException(ResponseEnum.PARAMS_ERROR);
}
Long chatListId = payload.getChatListId();
return ApiResult.success(chatListService.logicDeleteChatList(chatListId, uid));
}
/**
* Get bot information.
*
* @param request HTTP request object
* @param botId Bot ID
* @param workflowVersion Optional workflow version parameter
* @return ApiResult object containing bot information
*/
@GetMapping("/v1/get-bot-info")
@Operation(summary = "Get Bot Information")
public ApiResult<BotInfoDto> getBotInfo(HttpServletRequest request, Integer botId, @RequestParam(required = false) String workflowVersion) {
String uid = RequestContextUtil.getUID();View on GitHub (pinned to 5e758547a8)