Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update list of server app errors and fix assertion failure if unknown app error string is received #6772

Closed
wants to merge 5 commits into from

Conversation

michael-wb
Copy link
Contributor

@michael-wb michael-wb commented Jul 7, 2023

What, How & Why?

An unhandled app json error response from the server was causing an assertion failure when an error occurred in an atlas function was called. Unfortunately, the specific error value that was causing the failure was not captured in the customer issue.

Updated the error codes list to support the full list of errors that could be thrown by the server (from baas/common/errors.go, although the GraphQL errors were not included) and the AppUtils::check_for_errors() function was updated to properly handle error codes that were missing a string -> value mapping in the ErrorCodes class without causing the assertion to fail.

NOTE: The numeric values for these app errors was updated to fall within the 5000-6000 range, since the previous range was 4300-4399 and there are more than 100 error values. (potential breaking change)

If an unknown error string from the server is encountered, an AppError will be created with AppUnknownError and the reason string will be updated with the error string.

Fixes #6758

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)
  • C-API, if public C++ API changed.

@michael-wb michael-wb changed the title Updated list of AppErrors - Properly handle unknown app error Update list of server app errors and fix assertion failure if unknown app error string is received Jul 7, 2023
@michael-wb michael-wb marked this pull request as draft July 12, 2023 04:51
@michael-wb
Copy link
Contributor Author

Superceded by the changes from the Unify Sync Error project

@michael-wb michael-wb closed this Aug 11, 2023
@michael-wb michael-wb deleted the mwb/ensure-errorcodes-are-runtime-errors branch August 11, 2023 20:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The app crashed due to an error in the serverless function
1 participant