skandertebo / pokemon-go

Pokemon Go clone
1 stars 1 forks source link

Added JsonResponse for generic error and for validation errors #21

Open MohamedRebai41 opened 1 year ago

MohamedRebai41 commented 1 year ago

Under the functions directory of the /src/ in the symfony project , you can find functions to help you return appropriate json error responses. If the error you're facing concerns the validation of the incoming data, return the result of the createValidationErrorResponse($errors) function If you have any other error or exception (email already in use, ....) , return the result of the createErrorResponse($message,$status).