Rishav Singh
07/23/2025, 11:07 AMERROR: Server error: 500 Internal Server Error , maybe can you help ? it is generating for happy path but failing 400, 404 etcMatt (pactflow.io / pact-js / pact-go)
400.Matt (pactflow.io / pact-js / pact-go)
--endpoint argument when passing an OAD
2. The endpoint requested doesn’t match any routes in your OADRishav Singh
07/23/2025, 11:45 AMpactflow-ai generate --openapi ./dist/openapi.v1.json --endpoint '{"path": "/v2/rules/{ruleId}", "methods": ["Get"], "status": ["400"]}' --output ./src/test/java/com/outsystems/dp/rules/api/RulesPactTestForRuleId400.java --language javaRishav Singh
07/23/2025, 11:46 AMMatt (pactflow.io / pact-js / pact-go)
-vvv to your request, and DM me the output?Matt (pactflow.io / pact-js / pact-go)
pactflow-ai statusRishav Singh
07/23/2025, 12:05 PM-vvv in the end of the command?Rishav Singh
07/23/2025, 12:07 PM0.000359s DEBUG pactflow_ai pactflow-ai 1.9.1 (b2c43b4 2025-06-12)
0.004895s DEBUG pactflow_ai::config Reading configuration from environment variables
pactflow_ai::commands::generate::generate
0.005458s 0ms DEBUG pactflow_ai::commands::generate Running generate command
pactflow_ai::client::Building API client
0.005559s 0ms DEBUG pactflow_ai::client Building API client
0.005576s 0ms DEBUG pactflow_ai::client User-Agent: pactflow-ai/1.9.1 (b2c43b4 2025-06-12)
0.005640s 0ms DEBUG pactflow_ai::client Using HTTP timeout: 30s
0.005686s 0ms DEBUG pactflow_ai::client Using WebPKI certs
0.005992s 0ms DEBUG pactflow_ai::client Using token
0.006036s 0ms DEBUG pactflow_ai::client Using base URL: <https://outsystems.pactflow.io>
0.017656s 12ms INFO pactflow_ai::client::models Unable to parse endpoint matcher JSON. Assuming it is a path.
0.020393s 15ms DEBUG pactflow_ai::client POST generate
14.267627s 14s DEBUG pactflow_ai::client Checking API version
14.267746s 14s DEBUG pactflow_ai::client No API version returned
14.267951s 14s DEBUG pactflow_ai::client HEAD <https://outsystems.pactflow.io/api/ai/status/741c313d-8ffe-4a65-9092-ff4701c6067c>
25.795664s 25s DEBUG pactflow_ai::client Checking API version
25.795774s 25s DEBUG pactflow_ai::client API version: 1.9.3
25.795789s 25s DEBUG pactflow_ai::client CLI version: 1.9.1 (b2c43b4 2025-06-12)
25.795796s 25s WARN pactflow_ai::client A newer version of the CLI is available. Please update your CLI from <https://pactflow.io/ai/>
25.795817s 25s DEBUG pactflow_ai::client GET <https://outsystems.pactflow.io/api/ai/result/741c313d-8ffe-4a65-9092-ff4701c6067c>
ERROR: Server error: 500 Internal Server ErrorRishav Singh
07/23/2025, 12:08 PMpactflow-ai status command
Organization: outsystems
AI enabled (plan): true
AI enabled (system preferences): true
AI credits: 8 / 1000 (992 remaining)
User AI permissions:
- ai:*Rishav Singh
07/23/2025, 12:10 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Rishav Singh
07/23/2025, 12:10 PMMatt (pactflow.io / pact-js / pact-go)
Unable to parse endpoint matcher JSON. Assuming it is a path.this line seems relevant
Rishav Singh
07/23/2025, 12:12 PM"paths": {
"/v2/rules": {
"get": {
"tags": [
"Rules API"
],
"summary": "Get all details of all Rules",
"operationId": "getAll",Rishav Singh
07/23/2025, 12:12 PMMatt (pactflow.io / pact-js / pact-go)
--endpoint - is there one that matches /v2/rules/{ruleId}?Rishav Singh
07/23/2025, 12:13 PMRishav Singh
07/23/2025, 12:14 PMRishav Singh
07/23/2025, 12:14 PMMatt (pactflow.io / pact-js / pact-go)
Rishav Singh
07/23/2025, 12:17 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
status needs to be status_codes. Something looks to have changed, I’ll raise an internal bug.
Once I update that, things are working againRishav Singh
07/23/2025, 12:23 PMRishav Singh
07/23/2025, 12:26 PMRishav Singh
07/23/2025, 12:26 PMRishav Singh
07/23/2025, 12:26 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
--code flag (you can use this multiple times)
2. Use a test template
3. Create a set of prompts for re-use across all tests in the repo
See https://docs.pactflow.io/docs/ai/using#using-test-templates for more on thisMatt (pactflow.io / pact-js / pact-go)
Rishav Singh
07/23/2025, 12:34 PMRishav Singh
07/23/2025, 12:34 PMRishav Singh
07/23/2025, 12:36 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
can we pass multiple files for client code too to the command ? like controller, model and api client code together together ?yep. As per above, you can pass in
--code multiple timesMatt (pactflow.io / pact-js / pact-go)
The reason I ask about copilot, is that we’re looking to release an MCP server in the next month or so.
Here’s an example of what that might look like when integrated into VS Code with Copilot (via MCP)
Matt (pactflow.io / pact-js / pact-go)
Rishav Singh
07/23/2025, 12:45 PMMatt (pactflow.io / pact-js / pact-go)
Rishav Singh
07/24/2025, 2:54 AMRishav Singh
07/30/2025, 2:50 AMMatt (pactflow.io / pact-js / pact-go)
--instructions flag. e.g. --instructions "You must add tests for negative scenarios including for 400, 401 and 404 related errorsMatt (pactflow.io / pact-js / pact-go)
Rishav Singh
07/30/2025, 4:25 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)