Enhance document scraper service with AI portal integration and error handling

- Updated the document scraper service to include a new ScrapePortalsProvider interface, allowing for dynamic retrieval of supported scraping portals.
- Modified the ListPendingTenders and GetTenderByNoticeID methods to filter tenders based on document URLs that match the configured portals.
- Introduced new error handling for cases when the scrape portals provider is not configured, returning appropriate service unavailable responses.
- Enhanced API documentation to reflect changes in tender retrieval logic and added error response details for unsupported portal scenarios.

This update improves the document scraping functionality by integrating AI portal support, enhancing the overall reliability and flexibility of the tender management system.
This commit is contained in:
Mazyar
2026-06-21 09:58:11 +03:30
parent 550f11a77e
commit 45cfa24a72
7 changed files with 143 additions and 45 deletions
+2
View File
@@ -5,4 +5,6 @@ import "errors"
var (
// ErrInvalidDateRange is returned when created_at_from is after created_at_to.
ErrInvalidDateRange = errors.New("invalid date range: created_at_from must be before or equal to created_at_to")
// ErrScrapePortalsUnavailable is returned when the scrape portals provider is not configured.
ErrScrapePortalsUnavailable = errors.New("scrape portals provider is not configured")
)