Merged
Conversation
DmitryMK
approved these changes
Dec 5, 2025
RamilCDISC
approved these changes
Dec 5, 2025
Collaborator
RamilCDISC
left a comment
There was a problem hiding this comment.
The PR updates the exception to return status code of 400 instead of 500 along with the traceback for better debugging of errors. The update was validated in the dev editor by providing datasets that result in an exception. The error are correctly displayed in the result section and are readable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the internal server error 500 returned by engine to a 400 as well as providing the stack trace as a string. This prevents the 500 error status with no context in editor that occurs when engine fails to execute code. Unfortunately, Azure sanitizes 500 responses for security making them a generic 'Internal Server Error' without any message or context.

By converting the error to a 400 code, we are able to get the message and trace in editor to allow for a more informative message to the author. Since our codebase is open source, there is no security risk in exposing our code/stack trace in these errors. While a 400 status code isn't semantically precise for internal server errors, the debugging benefits outweigh this concern.