| 199 | } |
| 200 | |
| 201 | func (a *Application) VerifyHTTPOrRemove(ctx context.Context) error { |
| 202 | if err := a.verifyHTTP(ctx); err != nil { |
| 203 | if cleanupErr := a.Remove(context.Background(), true); cleanupErr != nil { |
| 204 | slog.Error("Failed to clean up after verification failure", "app", a.Settings.Name, "error", cleanupErr) |
| 205 | } |
| 206 | return err |
| 207 | } |
| 208 | |
| 209 | return nil |
| 210 | } |
| 211 | |
| 212 | func (a *Application) Remove(ctx context.Context, removeData bool) error { |
| 213 | if err := a.namespace.Proxy().Remove(ctx, a.Settings.Name); err != nil { |