0

I get PHP errors as unhandled exceptions but I don't really see any information that can help me. How can I troubleshoot this?

Unhandled exception - Joomla\CMS\Application\Exception\NotAcceptable

A PHP Exception occurred on your site. Here you can find the stack trace:
Exception Type: Joomla\CMS\Application\Exception\NotAcceptable
File: /home/*****/public_html/libraries/src/Application/ApiApplication.php
Line: 264
Message: Could not match accept header 
#0 /home/*****/public_html/libraries/src/Application/ApiApplication.php(107): Joomla\CMS\Application\ApiApplication->route()
#1 /home/*****/public_html/libraries/src/Application/CMSApplication.php(294): Joomla\CMS\Application\ApiApplication->doExecute()
#2 /home/*****/public_html/api/includes/app.php(53): Joomla\CMS\Application\CMSApplication->execute()
#3 /home/*****/public_html/api/index.php(31): require_once('/home/*****...')
#4 {main}
Request information
GET variables
Array
(
)
POST variables
Array
(
)
COOKIE variables
Array
(
)
REQUEST variables
Array
(
)
SERVER variables
Array
(
    [PATH] => /usr/local/bin:/bin:/usr/bin
    [HTTP_CONNECTION] => Keep-Alive
    [HTTP_HOST] => www.*****.co.uk
    [HTTP_X_HTTPS] => 1
    [DOCUMENT_ROOT] => /home/*****/public_html
    [REMOTE_ADDR] => *****
    [REMOTE_PORT] => 12961
    [SERVER_ADDR] => *****
    [SERVER_NAME] => www.*****.co.uk
    [SERVER_ADMIN] => webmaster@*****.co.uk
    [SERVER_PORT] => 443
    [REQUEST_SCHEME] => https
    [REQUEST_URI] => /api/Probe
    [REDIRECT_URL] => /api/Probe
    [REDIRECT_REQUEST_METHOD] => GET
    [HTTPS] => on
    [HTTP_AUTHORIZATION] => 
    [REDIRECT_STATUS] => 200
    [SSL_PROTOCOL] => TLSv1.2
    [SSL_CIPHER] => ECDHE-RSA-AES256-SHA
    [SSL_CIPHER_USEKEYSIZE] => 256
    [SSL_CIPHER_ALGKEYSIZE] => 256
    [SCRIPT_FILENAME] => /home/*****/public_html/api/index.php
    [QUERY_STRING] => 
    [SCRIPT_URI] => https://www.*****.co.uk/api/Probe
    [SCRIPT_URL] => /api/Probe
    [SCRIPT_NAME] => /api/index.php
    [SERVER_PROTOCOL] => HTTP/1.1
    [SERVER_SOFTWARE] => LiteSpeed
    [REQUEST_METHOD] => GET
    [X-LSCACHE] => on,crawler
    [PHP_SELF] => /api/index.php
    [REQUEST_TIME_FLOAT] => 1666174375.9687
    [REQUEST_TIME] => 1666174375
)

1 Answer 1

1

Whatever you're using to make the request doesn't send the Accept header. API application by default expects a request that accepts application/vnd.api+json response. Specific routes may use different values. If you want to accept any type, use the catch-all */* value.

3
  • Ok but how do I know what didn't send the header?
    – Eoin
    Oct 25, 2022 at 14:09
  • What are you using to make the request?
    – Sharky
    Oct 25, 2022 at 14:24
  • I'm not, I'm getting an email saying there was a PHP error and it gives me that information. Admin Tools sends it. But it would either be a user or a bot that triggered something to cause the error.
    – Eoin
    Oct 28, 2022 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.