# Changelog

All notable changes to the BugMail Browser SDK will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.1.13] - 2025-10-23

### Fixed
- **Critical:** Error filter was too aggressive and blocked ALL user errors when SDK was in call stack
- Replaced `isFromSdkCode()` check with `isEntirelySDKStack()` for more precise filtering
- SDK now correctly captures user errors that pass through SDK code
- Only filters errors where the ENTIRE stack trace is SDK code (internal SDK errors)

### Changed
- Improved error filtering logic to distinguish between user errors and SDK internal errors
- Error filter now checks if entire stack is SDK code, not just if SDK patterns exist

## [0.1.12] - 2025-10-22

### Added
- Comprehensive error filtering to prevent SDK self-reporting loops
- `ErrorFilter` class for centralized filtering logic
- Debug mode logging for filtered errors
- Detailed error filtering documentation
- FAQ documentation
- Error filtering quick reference guide
- Migration guide for error filtering behavior

### Changed
- SDK now filters out its own internal errors automatically
- Network errors are logged but not captured as errors
- Console capture now filters SDK messages with `[BugMail` prefix
- Improved error handling in network manager with consistent logging
- Backend API validation now returns proper HTTP status codes (400/401/403 instead of 500)

### Fixed
- **Critical:** Infinite loop when SDK encounters API validation errors
- SDK errors appearing in error dashboard
- Repeated network requests on API key validation failures
- SDK self-reporting creating noise in error logs
- Console.error capture triggering on SDK internal messages

## [0.1.11] - 2024-XX-XX

### Added
- User context collection enhancements
- Improved context API

### Changed
- Updated context collector implementation

## [0.1.10] - 2024-XX-XX

### Added
- Initial public release
- Automatic error capturing
- Promise rejection tracking
- Console error capture
- User context support
- Breadcrumb tracking
- Offline support with retry logic

### Features
- UMD and ESM builds
- CDN support
- Framework integrations (React, Vue)
- Configurable sample rate
- AI analysis integration

[Unreleased]: https://github.com/yourusername/bugmail-sdk/compare/v0.1.12...HEAD
[0.1.12]: https://github.com/yourusername/bugmail-sdk/compare/v0.1.11...v0.1.12
[0.1.11]: https://github.com/yourusername/bugmail-sdk/compare/v0.1.10...v0.1.11
[0.1.10]: https://github.com/yourusername/bugmail-sdk/releases/tag/v0.1.10
