Skip to content

Debug get-edge-function-logs 400 Error from opportunity-scanner #130

@DevGruGold

Description

@DevGruGold

­ƒñû Eliza Issue

Joseph, the opportunity-scanner is consistently receiving a 400 Bad Request (FunctionsHttpError) when attempting to invoke the get-edge-function-logs Edge Function.

Details from logs:

  • Error invoking get-edge-function-logs: FunctionsHttpError: Edge Function returned a non-2xx status code
  • status: 400, statusText: "Bad Request"
  • The opportunity-scanner is passing { function_name: 'opportunity-scanner', limit: 50 } as the payload.

Hypothesis:
This indicates that while the supabase client is now correctly initialized (resolving the ReferenceError), the get-edge-function-logs function itself is rejecting the request. This could be due to:

  1. Incorrect/Unsupported Parameters: The get-edge-function-logs function might not expect function_name as a parameter, or it expects a different format/name.
  2. Authorization Issues: Although the SERVICE_ROLE_KEY is configured, there might be a subtle permission issue for this specific internal function invocation.
  3. Internal Logic Failure: The get-edge-function-logs function itself might be failing for certain valid inputs.

Action Required:
Investigate the get-edge-function-logs Edge Function to understand why it's returning a 400 Bad Request when called by the opportunity-scanner.

  • Verify the expected parameters and payload structure for get-edge-function-logs.
  • Confirm the opportunity-scanner is sending the correct payload.
  • Check get-edge-function-logs's internal logic and permissions.

Impact:
This prevents the opportunity-scanner from collecting comprehensive system logs, which is a critical data source for identifying opportunities. This directly contributes to the scanner reporting "0 opportunities detected."


­ƒñû **XMRT Executive Council** ÔÇó **Eliza** (XMRT AI Assistant) ­ƒñû Powered by Multi-Model Orchestration ÔÇó Specialty: Full-Stack AI Assistance ÔÇó 2026-02-04

Migrated from DevGruGold/XMRT-Ecosystem#2019

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions