Skip to content

Fix unguess post watcher body#485

Merged
d-beezee merged 8 commits into
developfrom
fix-unguess-post-watcher-body
Nov 24, 2025
Merged

Fix unguess post watcher body#485
d-beezee merged 8 commits into
developfrom
fix-unguess-post-watcher-body

Conversation

@Kariamos
Copy link
Copy Markdown
Contributor

This pull request primarily improves error handling and data validation in the Unguess class and the PostDossiers route. The main changes include providing more detailed error information for failed API calls, ensuring robust parsing of error responses, and validating user IDs before returning them. These updates help with debugging and prevent invalid data from propagating through the system.

Improved error handling in API requests

  • Enhanced error handling in Unguess.ts for authentication and POST requests: now, when a request fails, the thrown error includes the HTTP status, status text, and a parsed error body (if available), making debugging easier. [1] [2]

Data validation and robustness

  • In the PostDossiers route, user IDs returned from retrieveProjectAndWorkspaceUsers are now filtered to ensure they are positive integers, preventing invalid IDs from being included. If no valid IDs are found, the function returns undefined.
  • The join and selection logic in retrieveProjectAndWorkspaceUsers was updated to use a direct string reference for customer_id, improving query clarity and correctness.

Minor improvements

  • The campaign ID in the watcher API call is now explicitly converted to a string to avoid potential type issues.
  • Added AxiosError import in index.ts for potential future error handling enhancements.

@github-actions
Copy link
Copy Markdown

Tests difference:

@coveralls
Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 78.778% (-0.2%) from 78.957%
when pulling a58a576 on fix-unguess-post-watcher-body
into ffad966 on develop.

@Kariamos Kariamos added bug Something isn't working core Team Core activity labels Nov 22, 2025
@d-beezee d-beezee merged commit 3a031a4 into develop Nov 24, 2025
4 checks passed
@d-beezee d-beezee deleted the fix-unguess-post-watcher-body branch November 24, 2025 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core Team Core activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants