[PR #1600] [MERGED] fix: add empty success responses #1748

Closed
opened 2026-02-26 20:30:54 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1600
Author: @dguyen
Created: 1/20/2025
Status: Merged
Merged: 1/20/2025
Merged by: @dguyen

Base: mainHead: fix/add-empty-success-responses


📝 Commits (3)

  • 911774b fix: add empty success responses
  • 13747d3 fix: undo password changes
  • 43f6e57 fix: undo password changes

📊 Changes

5 files changed (+43 additions, -16 deletions)

View changed files

📝 packages/trpc/server/document-router/router.ts (+9 -4)
📝 packages/trpc/server/document-router/schema.ts (+13 -0)
📝 packages/trpc/server/field-router/router.ts (+7 -4)
📝 packages/trpc/server/recipient-router/router.ts (+7 -4)
📝 packages/trpc/server/template-router/router.ts (+7 -4)

📄 Description

Description

Currently we can't set 201 responses for our API v2 responses, so we need to return some sort of JSON for endpoints that currently return z.void().

This is required since the SDK will assume there's JSON to be parsed in the body, and will throw an error.

Will use this as as a default response for endpoints that do not return anything.

{
  "success": true
}

🔄 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/documenso/documenso/pull/1600 **Author:** [@dguyen](https://github.com/dguyen) **Created:** 1/20/2025 **Status:** ✅ Merged **Merged:** 1/20/2025 **Merged by:** [@dguyen](https://github.com/dguyen) **Base:** `main` ← **Head:** `fix/add-empty-success-responses` --- ### 📝 Commits (3) - [`911774b`](https://github.com/documenso/documenso/commit/911774bedb5916406655af4754656b8d71447632) fix: add empty success responses - [`13747d3`](https://github.com/documenso/documenso/commit/13747d3c115754710894795915d405dda973042d) fix: undo password changes - [`43f6e57`](https://github.com/documenso/documenso/commit/43f6e5792a23e5da55fd4f588ba169cb9a2e6461) fix: undo password changes ### 📊 Changes **5 files changed** (+43 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `packages/trpc/server/document-router/router.ts` (+9 -4) 📝 `packages/trpc/server/document-router/schema.ts` (+13 -0) 📝 `packages/trpc/server/field-router/router.ts` (+7 -4) 📝 `packages/trpc/server/recipient-router/router.ts` (+7 -4) 📝 `packages/trpc/server/template-router/router.ts` (+7 -4) </details> ### 📄 Description ## Description Currently we can't set 201 responses for our API v2 responses, so we need to return some sort of JSON for endpoints that currently return `z.void()`. This is required since the SDK will assume there's JSON to be parsed in the body, and will throw an error. Will use this as as a default response for endpoints that do not return anything. ```ts { "success": true } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 20:30:54 +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/documenso#1748
No description provided.