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

[PLUGIN-1864] Error management for javascript transform plugin #1940

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

psainics
Copy link
Contributor

Description
Error Management for javascript transform plugin exceptions
https://cdap.atlassian.net/browse/PLUGIN-1864

Code change
Modified JavascriptTransform.java

Tests
Test Case - tested with valid script and script throwing exception

1. Valid script

Screenshot 2025-02-12 at 2 54 03 PM

2. Exception from script

Screenshot 2025-02-12 at 3 01 50 PM Screenshot 2025-02-12 at 3 02 05 PM Screenshot 2025-02-12 at 3 02 21 PM

@psainics psainics added the build Trigger unit test build label Feb 12, 2025
@psainics psainics self-assigned this Feb 12, 2025
@psainics psainics force-pushed the fem/javascript-error branch from 881e376 to b0f887b Compare February 13, 2025 08:34
String error = "Failed to get method ScriptObjectMirror#values() for converting ScriptObjectMirror to List." +
" Please check your version of Nashorn is supported.";
throw ErrorUtils.getProgramFailureException(new ErrorCategory(ErrorCategory.ErrorCategoryEnum.PLUGIN),
error, error, ErrorType.USER, false, e);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be SYSTEM error since user is not providing the method to be loaded.

@itsankit-google
Copy link
Member

please squash commits before merge.

Please remember to cherry-pick this PR in release/2.13.

@psainics psainics force-pushed the fem/javascript-error branch from 3255663 to f8a09fa Compare February 18, 2025 04:52
@psainics psainics merged commit bb49bd6 into cdapio:develop Feb 18, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Trigger unit test build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants