Skip to content

sql: add user-facing error for invalid job type in job_payload_type builtin#94713

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
jayshrivastava:job-pl-err-2
Jan 4, 2023
Merged

sql: add user-facing error for invalid job type in job_payload_type builtin#94713
craig[bot] merged 1 commit intocockroachdb:masterfrom
jayshrivastava:job-pl-err-2

Conversation

@jayshrivastava
Copy link
Copy Markdown
Contributor

@jayshrivastava jayshrivastava commented Jan 4, 2023

sql: add user-facing error for invalid job type in job_payload_type builtin

Previously, the job_payload_type builtin would return an internal error
if the payload could be unmarshalled, but the type could not be determined.
This changes ensures the builtin returns an appropriate user-facing error
in this case.

Epic: none
Fixes: #94680

Release note: None

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@jayshrivastava jayshrivastava marked this pull request as ready for review January 4, 2023 19:44
@jayshrivastava jayshrivastava requested a review from a team as a code owner January 4, 2023 19:44
@jayshrivastava jayshrivastava requested a review from a team January 4, 2023 19:44
@jayshrivastava jayshrivastava changed the title Job pl err 2 sql: add user-facing error for invalid job type in job_payload_type builtin Jan 4, 2023
Copy link
Copy Markdown
Collaborator

@rharding6373 rharding6373 left a comment

Choose a reason for hiding this comment

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

:lgtm: Thanks for the quick fix!

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

…uiltin

Previously, the `job_payload_type` builtin would return an internal error
if the payload could be unmarshalled, but the type could not be determined.
This changes ensures the builtin returns an appropriate user-facing error
in this case.

Epic: none
Fixes: cockroachdb#94680

Release note: None
@jayshrivastava
Copy link
Copy Markdown
Contributor Author

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jan 4, 2023

Build succeeded:

@craig craig bot merged commit cb3d6db into cockroachdb:master Jan 4, 2023
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.

roachtest: sqlsmith/setup=empty/setting=no-mutations failed

3 participants