This pull request primarily focuses on improving the validation and error handling in the application. The changes are spread across multiple files, mainly in the src/client/routes and src/server/controllers directories. The changes include updating status codes for error responses, replacing error with message in error handling, adding schema validation for request bodies, and removing some redundant validation checks.
This pull request primarily focuses on improving the validation and error handling in the application. The changes are spread across multiple files, mainly in the
src/client/routes
andsrc/server/controllers
directories. The changes include updating status codes for error responses, replacingerror
withmessage
in error handling, adding schema validation for request bodies, and removing some redundant validation checks.Error Handling Improvements:
src/client/routes/account/account.jsx
: Updated status codes for error handling and replacederror
withmessage
in error handling.src/client/routes/home/index.jsx
: Updated status codes for error handling and replacederror
withmessage
in error handling.src/client/routes/signup/index.jsx
: Updated status codes for error handling and replacederror
withmessage
in error handling.src/server/controllers/authentication.js
: Updated status codes for error handling and replacederror
withmessage
in error handling. [1] [2] [3]src/server/controllers/download.js
: Updated status codes for error handling. [1] [2]src/server/controllers/secret.js
: Removed redundant validation checks for text size and title length.Schema Validation Additions:
src/server/controllers/account.js
: Added schema validation for request bodies. [1] [2]src/server/controllers/authentication.js
: Added schema validation for request bodies. [1] [2]src/server/controllers/download.js
: Added schema validation for request bodies.src/server/controllers/secret.js
: Added schema validation for request bodies.Minor Changes:
src/client/routes/account/settings.jsx
: ChangedRestrict_organization_email
torestrict_organization_email
.src/server/helpers/validate-ttl.js
: ExportedVALID_TTL
array directly instead of a function.