-1

Why is this happening?

I am trying to debug an AJAX call which is returning a 500 status.

When I click on the Preview and Response, I just get:

 message:"Server Error"

Am I doing something wrong? Or has something changed?

Mick

Mick
  • 1,401
  • 4
  • 23
  • 40
  • 1
    share your code – Kuldeep Mishra Jul 04 '18 at 11:22
  • If you get 500, your best bet is to take a look at laravel.log or apache/nginx logs. – Kyslik Jul 04 '18 at 11:23
  • What code would you like to see? I don't see that any code is relevant. The log says "Method [subscriptionsForAgreement] does not exist" which explains the error but not why I can't see it in Chrome? – Mick Jul 04 '18 at 11:24
  • The `server error` is returned from your webserver. Chrome is just showing up what it got from server. Hence the ideal place to debug this is in server. I guess you were expecting PHP error messages instead of the blunt message from apache/nginx –  Jul 04 '18 at 11:29
  • More details [here](https://stackoverflow.com/questions/2687730/how-can-i-make-php-display-the-error-instead-of-giving-me-500-internal-server-er) –  Jul 04 '18 at 11:29
  • But, I haven't changed anything on my webserver (Homestead) and it used to work. – Mick Jul 04 '18 at 11:33
  • Like @Kyslik said. Check your laravel .log file. – Rick J Jul 04 '18 at 11:41
  • @Rick_Jellema I did that, you can read the result above. I don't want to know the error, I want to know why it does not get returned to Chrome. – Mick Jul 04 '18 at 11:46
  • 1
    @Mick Ah, my bad, for not understanding the question :). – Rick J Jul 04 '18 at 11:47

1 Answers1

2

Added this to my .env file:

APP_DEBUG=true;

It's working now.

Mick
  • 1,401
  • 4
  • 23
  • 40