Skip to main content
All Docs
FeaturesmyProp (AgentOS People Portal)Updated April 4, 2026

Fixing the BFF Vendor Path Bug — What Went Wrong and How We Fixed It

Fixing the BFF Vendor Path Bug — What Went Wrong and How We Fixed It

Release: v0.1.84

Overview

Version 0.1.84 fixes a silent but impactful bug in myProp's Backend-for-Frontend (BFF) layer: vendor data requests were being sent to the wrong URL on the AgentOS LETMC API, causing vendor lookups to fail for all affected agencies.

What Is the BFF Layer?

The BFF (src/app/api/bff/[...path]/route.ts) is the server-side proxy that sits between the myProp frontend and the AgentOS LETMC API. Every time the portal needs to fetch data — tenancy details, financial statements, vendor records — it goes through this route handler, which authenticates the request, resolves the correct agency client name, and forwards the call to AgentOS.

What Broke

The accounts/vendor handler was using a shared helper, ppGet(), to construct outbound requests:

// Before (broken)
ppGet(clientName, `/vendor/${vendorID}`)

Internally, ppGet() delegates to ppPath(), which prepends a base path of:

/v1/corporate/peopleportal/letmcletting/{clientName}

This produced a final request URL of:

GET /v1/corporate/peopleportal/letmcletting/{clientName}/vendor/{vendorID}

The AgentOS LETMC API spec defines this endpoint as:

GET /{clientName}/vendors/{vendorID}

There were two distinct errors:

ProblemBroken valueCorrect value
Path prefix/v1/corporate/peopleportal/letmcletting/{clientName}/{clientName}
Resource namevendor (singular)vendors (plural)

Because the path prefix is entirely wrong for the LETMC API, requests were silently routed to a non-existent path, resulting in failed vendor lookups across all agencies using the vendor portal flow.

The Fix

The vendor handler now bypasses ppGet() entirely and calls letmcClient directly with the correctly-structured path:

// After (fixed)
letmcClient.get(`/${encodePath(clientName)}/vendors/${encodeURIComponent(vendorID)}`)

This matches the AgentOS LETMC API spec exactly:

  • No /v1/corporate/peopleportal/letmcletting/ prefix
  • Plural vendors resource segment
  • Both clientName and vendorID are individually encoded for URL safety

Broader Impact — Review All ppGet/ppPost Calls

The ppPath() helper appears to have been designed for a different API surface (possibly the People Portal internal API) and is structurally incompatible with the AgentOS LETMC API path scheme. Any other BFF handler that currently uses ppGet() or ppPost() may be sending requests to the wrong base path.

Recommended action for developers: Audit every ppGet and ppPost call in src/app/api/bff/[...path]/route.ts. For any call targeting the LETMC API, replace it with a direct letmcClient.get() or letmcClient.post() call using the path structure /{clientName}/... as documented in the AgentOS API spec.

Impact Summary

  • Who was affected: Any agency using the vendor account view in the myProp portal.
  • Symptom: Vendor data failed to load; requests returned errors or empty responses.
  • Severity: High — vendor lookups were entirely non-functional via the BFF.
  • Fix complexity: Low — single-line path correction on the outbound call.