What's reason of this error?

Posted 3 months ago by alihoushyaripour

I can't describe my problem well, so take a photo:


This error happen for a route and in every 5 times that I refresh browser, in 4 times this error occur and in 1 time response get backed successfully...

Has anyone ever encountered this problem?!

Notic: I used elasticsearch in controller, I test services and repositories work well and I think error occurred in response resource collection.

Controller class:

public function place(PlaceRequest $request)
    // validator
    $request = $request->validated();

    // parameters
    $result = (new MyElastic())->search($request);

    // resource
    $places = PlaceResource::collection($result->places);

    // log

    // result
    return response()->json($places, 200);

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.