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

Validation error contains argument index or name #214

Merged
merged 2 commits into from
Aug 25, 2023

Conversation

Vivien-marble
Copy link

@Vivien-marble Vivien-marble commented Aug 25, 2023

Better validation error

When an operator refuse an argument (wrong type), the error is annotated with the argument index or name.

type EvaluationErrorDto struct {
	EvaluationError string  `json:"error"`
	Message         string  `json:"message"`
	ArgumentIndex   *int    `json:"argument_index,omitempty"`
	ArgumentName    *string `json:"argument_name,omitempty"`
}
image

@Vivien-marble Vivien-marble changed the title Backoffice displays argument index of validation error Validation error contains argument index or name Aug 25, 2023
@Vivien-marble Vivien-marble force-pushed the vivien/evaluation-error-argument branch from c33db6f to 3d6cd60 Compare August 25, 2023 08:40
@Vivien-marble Vivien-marble force-pushed the vivien/evaluation-error-argument branch from 3d6cd60 to 50da238 Compare August 25, 2023 09:26
dto/evaluation_error_dto_test.go Show resolved Hide resolved
marble-backoffice/src/services/AstEditorService.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@Pascal-Delange Pascal-Delange left a comment

Choose a reason for hiding this comment

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

👍
I like this because that should allow us to slowly separate the "raw stacktrace" errors from the thing we display in front

@Vivien-marble Vivien-marble force-pushed the vivien/evaluation-error-argument branch from 077b807 to a9f7385 Compare August 25, 2023 10:50
@Vivien-marble Vivien-marble enabled auto-merge (rebase) August 25, 2023 10:50
@Vivien-marble Vivien-marble merged commit b55e056 into master Aug 25, 2023
1 check passed
@Vivien-marble Vivien-marble deleted the vivien/evaluation-error-argument branch August 25, 2023 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants