iflytek/astron-agent · error · BusinessException

8008

8008

Error message

exceed.authority

What it means

BusinessException with ResponseEnum.PAGE_SEPARATOR_MISS, which is defined as (8008, "exceed.authority") — so the user-visible message 'exceed.authority' is misleading; the actual condition is missing/empty pagination parameters. WorkflowAutomationController.page rejects the request when pagination.isEmpty() is true before querying tasks.

Solutions

  1. Always send current and pageSize query parameters, e.g. ?current=1&pageSize=10.
  2. Set client defaults (current=1, pageSize=10/20) before issuing the request.
  3. Server-side: default the pagination when empty instead of throwing, or use a dedicated 'missing pagination parameters' response code so the message isn't 'exceed.authority'.
  4. Check the request URL in the browser network tab to confirm the paging params are actually sent.

Example fix

// before
GET /workflow-automation?search=backup
// after
GET /workflow-automation?search=backup&current=1&pageSize=10
Defensive patterns

Strategy: validation

Validate before calling

function buildListQuery({ current = 1, pageSize = 10, ...rest }) {
  const params = new URLSearchParams({ current: String(current), pageSize: String(pageSize) });
  Object.entries(rest).forEach(([k, v]) => v != null && params.append(k, String(v)));
  return params.toString();
}

Type guard

const hasPagination = (p) => p != null && p.current != null && p.pageSize != null;

Try / catch

try {
  const page = await api.listAutomationTasks(query);
} catch (e) {
  if (e.code === 8008 && (!query.current || !query.pageSize)) {
    // message says 'exceed.authority' but the real cause is missing paging params
    return api.listAutomationTasks({ ...query, current: 1, pageSize: 10 });
  } else throw e;
}

Prevention

When it happens

Trigger: GET the workflow-automation list endpoint without current/pageSize (or with a Pagination object that isEmpty() reports as empty), e.g. /workflow-automation?search=foo with no paging params.

Common situations: Client omits default paging values; frontend pagination component not initialized on first render; proxies/gateways stripping query params; Pagination considered empty when both current and size are null.

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/efa2ab8ca3ba8991. Report an issue: GitHub.

Appendix: source

Thrown at console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/controller/workflow/WorkflowAutomationController.java:53

@Validated
@RequiredArgsConstructor
@Tag(name = "Workflow automation management interface")
public class WorkflowAutomationController {

    private final WorkflowAutomationService workflowAutomationService;

    @GetMapping("/page")
    @SpacePreAuth(
            key = "WorkflowAutomationController_page_GET",
            module = "Workflow Automation",
            point = "Workflow Automation List",
            description = "Workflow Automation List")
    public PageData<WorkflowAutomationTask> page(
            @NotNull(message = "Pagination parameters cannot be null") Pagination pagination,
            @RequestParam(required = false) String search,
            @RequestParam(required = false) Boolean enabled) {
        if (pagination.isEmpty()) {
            throw new BusinessException(ResponseEnum.PAGE_SEPARATOR_MISS);
        }
        return workflowAutomationService.pageTasks(pagination.getCurrent(), pagination.getPageSize(), search, enabled);
    }

    @PostMapping
    @SpacePreAuth(
            key = "WorkflowAutomationController_create_POST",
            module = "Workflow Automation",
            point = "Workflow Automation Create",
            description = "Workflow Automation Create")
    public WorkflowAutomationTask create(@RequestBody @Valid WorkflowAutomationTaskReq req) {
        return workflowAutomationService.createTask(req);
    }

    @PutMapping("/{id}")
    @SpacePreAuth(
            key = "WorkflowAutomationController_update_PUT",
            module = "Workflow Automation",

View on GitHub (pinned to 5e758547a8)