[PR #5470] [CLOSED] Add missing 'as const' assertions in error constants[HacktoberFest] #5227

Closed
opened 2026-03-17 02:41:45 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5470
Author: @abhishekmaniy
Created: 10/9/2025
Status: Closed

Base: mainHead: fix/semicolon-consistency-errors


📝 Commits (1)

  • add5b64 fix: add missing 'as const' assertions for consistency in errors.ts

📊 Changes

1 file changed (+4 additions, -4 deletions)

View changed files

📝 packages/hoppscotch-backend/src/errors.ts (+4 -4)

📄 Description

Summary

  • Add missing as const type assertions to error constant declarations
  • Improve type safety and consistency across all error constants
  • Ensure TypeScript treats these as literal types rather than general strings

Test plan

  • Verify TypeScript compilation succeeds
  • Confirm error constants maintain proper typing
  • Check that error handling functionality remains unchanged

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/5470 **Author:** [@abhishekmaniy](https://github.com/abhishekmaniy) **Created:** 10/9/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/semicolon-consistency-errors` --- ### 📝 Commits (1) - [`add5b64`](https://github.com/hoppscotch/hoppscotch/commit/add5b64f07106c66a6b157549efea6e44d41ca09) fix: add missing 'as const' assertions for consistency in errors.ts ### 📊 Changes **1 file changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-backend/src/errors.ts` (+4 -4) </details> ### 📄 Description ## Summary - Add missing `as const` type assertions to error constant declarations - Improve type safety and consistency across all error constants - Ensure TypeScript treats these as literal types rather than general strings ## Test plan - [x] Verify TypeScript compilation succeeds - [x] Confirm error constants maintain proper typing - [x] Check that error handling functionality remains unchanged --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:41:45 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#5227
No description provided.