Hi,
The monday.com Apps framework SDK for JavaScript (last updated 6 months ago) appears to be outdated compared to the newer Monday GraphQL JS SDK (updated 22 days ago).
There are some issues with how the ‘old’ SDK handles errors from the API. These issues are resolved in the new SDK, but this SDK requires an access token, meaning that we would have to implement OAuth to be able to us this. While the old sdk does not require this.
-
The sdk only the error message, omitting the full error with errors array:
- Limited error information: Only the error message is returned
- References issues:
-
The sdk uses window.postMessage for API communication:
- sdk sends request info to monday.com via postMessage
- monday.com makes the actual API call
- If an error occurs, monday.com throws it, appearing in the browser console
-
This approach leads to two issues:
- Redundant error handling: We handle errors in our app, while monday.com separately logs them
- Limited control: We can’t suppress or manage these console errors from our end
-
The sdk handles errors inconsistently for server-side and client-side operations:
- Server-side errors: Received in the response as expected
- Client-side errors: An error is thrown instead of being included in the response