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

🐛 Fixes codeSnip bug in YAML v3. #444

Merged
merged 3 commits into from
Jul 17, 2023
Merged

🐛 Fixes codeSnip bug in YAML v3. #444

merged 3 commits into from
Jul 17, 2023

Conversation

jortel
Copy link
Contributor

@jortel jortel commented Jul 17, 2023

Fixes konveyor/tackle2-addon-analyzer#24

The issues seems to be a bug in yaml.v3. go-yaml/yaml#972

Also replaces:

if err != nil {
    h.Status(ctx, http.StatusBadRequest)
    return
}

with

if err != nil {
    err = &BadRequestError{err.Error()}
    _ = ctx.Error(err)
    return
}

so that the error is reported as BadRequest with an explaination of the error in the body instead of InternalServerError.

Copy link
Collaborator

@mansam mansam left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Handle multi-line code snippets correctly
2 participants