AmericaSCORESBayArea / salesforce-data-api

This project is based on Mulesoft Dataweave and Salesforce to provide secure, reliable, API access for all the Scores apps and projects. It is hosted on Anypoint and acts as the transactional hub, in concert with the authentication API
3 stars 1 forks source link

Sandbox Data API multiple errors on /coach endpoint #292

Closed CritiqalPete closed 1 month ago

CritiqalPete commented 1 month ago

Dependency Coach App

General Description Seems sometimes the app is sending a malformed GET/POST and the API is not handling but having a null-pointer exception.

Expected Behavior An invalid ID, argument type, or even malformed URL+Endpoint header needs to have a graceful fail

  1. A reply: <request arg/line> is invalid or not recognized. Salesforce Response |. Please correct the request and try again.
  2. log this in the Mule Log in a way that is easy to find
AleksandrMolchagin commented 1 month ago

All 11 /coach endpoints were documented in #294 based on their usage in the Coach App. Auto-validation of requests prior to execution is not possible at the moment because they are overloaded with query parameters (some are required, while others are optional depending on the input). Ideally, we need to redesign most of these endpoints and simplify them into multiple endpoints.