这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@betaprior
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 10, 2025 22:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

// Replace null string representations with nulls
patched, err = restoreNulls(patched, nullabilitySettings)
if err != nil {
huma.WriteErr(api, ctx, http.StatusUnprocessableEntity, "failed to replace nulls in request", err)
Copy link

Copilot AI Apr 10, 2025

Choose a reason for hiding this comment

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

The error message for restoreNulls failures is identical to that for replaceNulls, which may be confusing. Consider updating it to clearly indicate that the error occurred during the restoration step.

Suggested change
huma.WriteErr(api, ctx, http.StatusUnprocessableEntity, "failed to replace nulls in request", err)
huma.WriteErr(api, ctx, http.StatusUnprocessableEntity, "failed to restore nulls in request", err)

Copilot uses AI. Check for mistakes.
@betaprior betaprior closed this Apr 10, 2025
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.

2 participants