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

Want to customise errors when using MaxUploadSize #1089

Closed
keisku opened this issue Mar 5, 2020 · 1 comment
Closed

Want to customise errors when using MaxUploadSize #1089

keisku opened this issue Mar 5, 2020 · 1 comment
Labels

Comments

@keisku
Copy link

keisku commented Mar 5, 2020

Hi, I want to ask you a question to cutomise errors.

I know we can customise errors by using hooks.
But it is only when using resolvers, I guess.

Do you have any plans to implement functions to customise errors even if using AddTransport.MultipartForm.MaxUpoadSize ?

What happened?

can't return my error when using AddTransport.MultipartForm.MaxUpoadSize.

MaxUploadSize can define the max limit of file size and return the error "failed to parse multipart form, request body too large" only.

What did you expect?

I want to customise this error message regarding to gqlerror.

type Error struct {
	Message    string                 `json:"message"`
	Path       ast.Path               `json:"path,omitempty"`
	Locations  []Location             `json:"locations,omitempty"`
	Extensions map[string]interface{} `json:"extensions,omitempty"`
	Rule       string                 `json:"-"`
}

Minimal graphql.schema and models to reproduce

None.

versions

  • gqlgen version? v.011.1
  • go version? 1.13.4
  • dep or go modules? go modules
@keisku keisku changed the title want to want to customise errors when using MaxUploadSize Mar 5, 2020
@keisku keisku changed the title want to customise errors when using MaxUploadSize Want to customise errors when using MaxUploadSize Mar 5, 2020
@stale
Copy link

stale bot commented May 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 4, 2020
@stale stale bot closed this as completed May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant