Skip to content

Conversation

@SuchetaVadakkepat10
Copy link
Contributor

@SuchetaVadakkepat10 SuchetaVadakkepat10 commented Sep 17, 2025

Description

This PR focuses on improving the error handling mechanism by the following ways:

  • Added custom error classes with proper HTTP status codes (BadRequestError, NotFoundError, etc.)
  • Implemented validation functions for file uploads (size, format, filename) and job requests
  • Added try-catch blocks to all API endpoints with consistent JSON error responses
  • Enhanced file upload validation with size limits (100MB) and supported formats (.mp4, .avi, .mov, .mkv, .wmv)

Related Issue

This PR address #14

Type of Change

  • Bug fix
  • New feature
  • Enhancement
  • Documentation
  • Other (please specify)

How Has This Been Tested?

All the error logging mechanism was tested with Postman; the API endpoints were tested using valid and invalid inputs.

  • File upload validation: Tested with unsupported formats, empty files, and missing video field
  • Job ID validation: Tested with invalid UUIDs, non-existent job IDs, and malformed requests
  • API endpoints: Verified all endpoints return proper HTTP status codes (400, 404, 413, 415, 500)

Screenshots (if applicable)

Checklist

  • My code follows the project’s style guidelines
  • I have performed a self-review of my code
  • I have commented my code where necessary
  • I have added/updated tests (if applicable)
  • Documentation has been updated (if needed)

@MasterAffan MasterAffan merged commit fa42790 into MasterAffan:main Sep 18, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants