Skip to content

Update backend error messages#40364

Merged
sgress454 merged 6 commits intomainfrom
sgress454/update-backend-error-messages
Feb 25, 2026
Merged

Update backend error messages#40364
sgress454 merged 6 commits intomainfrom
sgress454/update-backend-error-messages

Conversation

@sgress454
Copy link
Copy Markdown
Contributor

@sgress454 sgress454 commented Feb 23, 2026

Related issue: For #40348

Details

This PR updates a number of error message on the server to use fleet and report instead of team or query where applicable.

Checklist for submitter

If some of the following don't apply, delete the relevant line.

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.
    this is all internal, i don't think it warrants a changelog

Testing

  • Added/updated automated tests
  • QA'd all new/changed functionality manually
    I did not go trying to trigger all these errors. It's text changes.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 76.66667% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.27%. Comparing base (04a9f1a) to head (1edf4a0).
⚠️ Report is 112 commits behind head on main.

Files with missing lines Patch % Lines
ee/server/service/software_installers.go 50.00% 1 Missing and 1 partial ⚠️
ee/server/service/setup_experience.go 0.00% 1 Missing ⚠️
ee/server/service/vpp.go 50.00% 1 Missing ⚠️
server/datastore/mysql/scheduled_queries.go 0.00% 1 Missing ⚠️
server/service/global_policies.go 0.00% 1 Missing ⚠️
server/service/hosts.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #40364      +/-   ##
==========================================
- Coverage   66.27%   66.27%   -0.01%     
==========================================
  Files        2459     2460       +1     
  Lines      197073   197340     +267     
  Branches     8572     8572              
==========================================
+ Hits       130614   130786     +172     
- Misses      54636    54706      +70     
- Partials    11823    11848      +25     
Flag Coverage Δ
backend 68.13% <76.66%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sgress454 sgress454 marked this pull request as ready for review February 24, 2026 21:01
@sgress454 sgress454 requested a review from a team as a code owner February 24, 2026 21:01
@sgress454 sgress454 added this to the 4.82.0 milestone Feb 24, 2026
@sgress454 sgress454 marked this pull request as draft February 24, 2026 21:01
err = fleet.NewInvalidArgumentError("script", err.Error()).WithStatus(http.StatusConflict) // TODO: confirm error message with product/frontend
} else if errors.As(err, &fkErr) {
err = fleet.NewInvalidArgumentError("team_id", "The team does not exist.").WithStatus(http.StatusNotFound)
err = fleet.NewInvalidArgumentError("team_id/fleet_id", "The fleet does not exist.").WithStatus(http.StatusNotFound)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

At this point, we don't know what key they actually used. So I'm just listing both. These are server logs, not user-facing, and they'll go away in Fleet 5.

@sgress454 sgress454 marked this pull request as ready for review February 24, 2026 21:25
Comment thread ee/server/service/teams.go Outdated
Copy link
Copy Markdown
Contributor

@iansltx iansltx left a comment

Choose a reason for hiding this comment

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

Couple minor wording tweaks, but reasonable on the whole

Comment thread server/datastore/mysql/policies.go Outdated
Comment thread server/fleet/teams.go Outdated
@sgress454
Copy link
Copy Markdown
Contributor Author

Addressed feedback, good finds!

Copy link
Copy Markdown
Contributor

@iansltx iansltx left a comment

Choose a reason for hiding this comment

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

Thx for the cleanup! LGTM.

@sgress454 sgress454 merged commit 9da7008 into main Feb 25, 2026
49 checks passed
@sgress454 sgress454 deleted the sgress454/update-backend-error-messages branch February 25, 2026 19:55
sgress454 added a commit that referenced this pull request Feb 26, 2026
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** For #40348

# Details

This PR updates a number of error message on the server to use `fleet`
and `report` instead of `team` or `query` where applicable.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
this is all internal, i don't think it warrants a changelog

## Testing

- [X] Added/updated automated tests
- [ ] QA'd all new/changed functionality manually
I did not go trying to trigger all these errors.  It's text changes.
iansltx pushed a commit that referenced this pull request Feb 26, 2026
Cherry-pick of #40364 into `rc-minor-fleet-v4.82.0`.
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