gotify/server · error
app with id %d doesn't exists
Error message
app with id %d doesn't exists
What it means
DeleteApplication in api/application.go aborts with 404 when the application id from the URL either does not exist or belongs to a different user than the authenticated one (app == nil or app.UserID != auth.GetUserID(ctx)); the formatted message includes the requested id. Ownership is deliberately hidden behind 404 so callers cannot probe other users' applications.
Source
Thrown at api/application.go:207
func (a *ApplicationAPI) DeleteApplication(ctx *gin.Context) {
withID(ctx, "id", func(id uint) {
app, err := a.DB.GetApplicationByID(id)
if success := successOrAbort(ctx, 500, err); !success {
return
}
if app != nil && app.UserID == auth.GetUserID(ctx) {
if app.Internal {
ctx.AbortWithError(400, errors.New("cannot delete internal application"))
return
}
if success := successOrAbort(ctx, 500, a.DB.DeleteApplicationByID(id)); !success {
return
}
if app.Image != "" {
os.Remove(a.ImageDir + app.Image)
}
} else {
ctx.AbortWithError(404, fmt.Errorf("app with id %d doesn't exists", id))
}
})
}
// UpdateApplication updates an application info by its id.
// swagger:operation PUT /application/{id} application updateApplication
//
// Update an application.
//
// ---
// consumes: [application/json]
// produces: [application/json]
// security: [clientTokenAuthorizationHeader: [], clientTokenHeader: [], clientTokenQuery: [], basicAuth: []]
// parameters:
// - name: body
// in: body
// description: the application to update
// required: trueView on GitHub (pinned to 14bfc25627)
Solutions
- Verify the application id in the request URL belongs to the authenticated user
- List the user's applications first and delete by an id from that list
- Do not retry with the same id expecting success — a 404 here is final for that user
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at api/application.go:207 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gotify/server@14bfc25627 (2026-09-05).
Data as JSON: /api/errors/499e4c3b90ce14c1.
Report an issue: GitHub.