Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

120 add token limit #127

Merged
merged 5 commits into from
Dec 26, 2024
Merged

120 add token limit #127

merged 5 commits into from
Dec 26, 2024

Conversation

TakalaWang
Copy link
Contributor

No description provided.

@TakalaWang TakalaWang linked an issue Dec 26, 2024 that may be closed by this pull request
@TakalaWang
Copy link
Contributor Author

This pull request includes several changes to improve error handling and validation in the API endpoints. The most important changes involve adding content length and file size validations, and enhancing error responses.

Error handling and validation improvements:

@JacobLinCool JacobLinCool requested review from Copilot and removed request for JacobLinCool December 26, 2024 17:03
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/routes/api/template/[id]/resource/+server.ts:57

  • The error message 'File size limit exceeded' is unclear. It should specify the limit, e.g., 'File size limit exceeded. Maximum allowed size is 10MB.'
return json({ error: 'File size limit exceeded' }, { status: 400 });

@TakalaWang TakalaWang merged commit 6445ab7 into main Dec 26, 2024
4 checks passed
@TakalaWang TakalaWang deleted the 120-add-token-limit branch December 26, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add token limit
1 participant