You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: merge server error handling functions into handleServerError (#257)
Code in this PR merges the functionality of `handleServerErrorLog` and
`handleReturnedServerError` functions into a single optional
initialization function called `handleServerError`. This change has been
made because having two functions for server error handling is
unnecessary, you can easily manage both logging and returned error
within a single function.
Copy file name to clipboardexpand all lines: website/docs/define-actions/action-result-object.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -10,4 +10,4 @@ Here's how action result object is structured (all keys are optional):
10
10
-`data`: when execution is successful, what you returned in action's server code.
11
11
-`validationErrors`: when input data doesn't pass validation, an object that contains the validation errors. Can be customized using [`defaultValidationErrorsShape`](/docs/define-actions/create-the-client#defaultvalidationerrorsshape) initialization option and/or via [`handleValidationErrorsShape`function passed to `schema` method](/docs/define-actions/validation-errors#customize-validation-errors-format).
12
12
-`bindArgsValidationErrors`: when bound arguments don't pass validation, an object that contains the validation errors. Can be customized using [`defaultValidationErrorsShape`](/docs/define-actions/create-the-client#defaultvalidationerrorsshape) initialization option and/or via [`handleBindArgsValidationErrorsShape` function passed to `bindArgsSchemas` method](/docs/define-actions/validation-errors#customize-validation-errors-format).
13
-
-`serverError`: when execution fails, an error object that contains the error message, customizable by using the [`handleReturnedServerError`](/docs/define-actions/create-the-client#handlereturnedservererror) initialization function.
13
+
-`serverError`: when execution fails, an error object that contains the error message, customizable by using the [`handleServerError`](/docs/define-actions/create-the-client#handleservererror) initialization function.
0 commit comments