Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

[BUG] Hallucinated error handling upon significant profile change #339

Open
zdne opened this issue Jul 24, 2023 · 1 comment
Open

[BUG] Hallucinated error handling upon significant profile change #339

zdne opened this issue Jul 24, 2023 · 1 comment
Labels
AI-related Issue is related to use of AI in our BE

Comments

@zdne
Copy link
Member

zdne commented Jul 24, 2023

Following the pipedrive tutorial everything works ok.

When I simplify the profile and change it to

name = "contacts-management/get-organizations"
version = "0.0.0"

"Retrieve a page of companies with in a CRM, Returns all organizations in the system."
usecase ListCompanies safe  {
  input {
  }
  result {
    companies[
      {
        "Name of the company"
        name! string!
      }
    ]
  }
}

and run the

sf map pipedrive organizations-management/get-organizations

I get map with incorrect error handling (with original profile it was correct):

Screenshot 2023-07-20 at 10 22 22

  • green is the new, incorrect, handling with the modified profile
  • red is the previous, correct, handling with the original profile

This incorrect handling is causing the error:

errorResult: { code: 200, message: 'HTTP call failed' }

When I correct the handling to (red version) then it works ok.

Expected Behavior

The error handling in map is correct, as it was in the map generated from the original profile.

Current Behavior

The error handling is not correct and causes false errors.

Steps to Reproduce

  1. follow the pipedrive tutorial
  2. then, replace the profile with the one above

Your Environment

  • macOS 13.4.1
  • @superfaceai/cli/4.0.0 darwin-x64 node-v18.13.0
@Jakub-Vacek Jakub-Vacek added the AI-related Issue is related to use of AI in our BE label Jul 25, 2023
@julpat
Copy link
Contributor

julpat commented Jul 31, 2023

I can confirm it. Even without any profile modification. Condition in the map if (response.status !== 200) { vs response returning 201 when successful.

Prompt: "create organization"
Docs used: https://developers.pipedrive.com/docs/api/v1/openapi.yaml (I have followed the Pipedrive example in our docs)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AI-related Issue is related to use of AI in our BE
Projects
None yet
Development

No branches or pull requests

3 participants