knuckleswtf / scribe

Generate API documentation for humans from your Laravel codebase.✍
https://scribe.knuckles.wtf/laravel/
MIT License
1.58k stars 280 forks source link

QueryException after endpoint with qued task is hit #800

Open jonkerw85 opened 4 months ago

jonkerw85 commented 4 months ago

Scribe version

4.29

PHP version

8.3.2

Framework

Laravel

Framework version

10.43.0

Scribe config

title => "API"
base_url => "https://example.com"
static.output_path => "public/docs/scribe/"
auth.enabled => true
auth.placeholder => "{TOKEN}"
strategies.metadata => removed Knuckles\Scribe\Extracting\Strategies\Metadata\GetFromMetadataAttributes
strategies.urlParameters => added Knuckles\Scribe\Extracting\Strategies\UrlParameters\GetFromLumenAPI: removed Knuckles\Scribe\Extracting\Strategies\UrlParameters\GetFromUrlParamAttribute
strategies.queryParameters => removed Knuckles\Scribe\Extracting\Strategies\QueryParameters\GetFromQueryParamAttribute
strategies.headers => added Knuckles\Scribe\Extracting\Strategies\Headers\GetFromRouteRules: removed Knuckles\Scribe\Extracting\Strategies\Headers\GetFromHeaderAttribute, [
    'override',
    [
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
    ],
]
strategies.bodyParameters => removed Knuckles\Scribe\Extracting\Strategies\BodyParameters\GetFromFormRequest, Knuckles\Scribe\Extracting\Strategies\BodyParameters\GetFromInlineValidator, Knuckles\Scribe\Extracting\Strategies\BodyParameters\GetFromBodyParamAttribute
strategies.responses => added Knuckles\Scribe\Extracting\Strategies\Responses\ResponseCalls: removed Knuckles\Scribe\Extracting\Strategies\Responses\UseResponseAttributes, [
    'Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls',
    [
        'only' => [
            'GET *',
        ],
    ],
]
strategies.responseFields => removed Knuckles\Scribe\Extracting\Strategies\ResponseFields\GetFromResponseFieldAttribute
database_connections_to_transact.1 => "db2"

What happened?

I have an endpoint called "search" with a que. It is structured as follows:

SearchTermLogger::dispatchAfterResponse(
      $params,
      $request->ip(),
      config('app.url') . urldecode($request->getRequestUri()),
      $search
  );

After hitting this endpoint, I receive the following message repeated for every scanned endpoint:

✖ Illuminate\Database\QueryException in /var/www/html/example.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php at line 783: SQLSTATE[HY000]: General error: -7008 [IBM][System i Access ODBC Driver][DB2 for i5/OS]SQL7008 - WPSLOG in XXXX not valid for operation. (SQLExecute[-7008] at ./ext/pdo_odbc/odbc_stmt.c:263) (Connection: db2, SQL: insert into WPSLOG (PSLKEY, PSLWRD, PSLBDF, PSLWID, PSLIP#, PSLURL, PSLV#9, PSLD#L, PSLT#L, PSLUUR, PSLDG#, PSLWK#, PSLMND, PSLJ#L) values (ZOEKEN, johnnie walker, 32, 9300, 127.0.0.1, https://example.com/api/xxxx/search, 322, 20240208, 104017, 10, 5, 06, 02, 2024))
✖ Run this again with the --verbose flag to see the full stack trace.

The que just works fine when hitting the endpoint manually; everything works as expected.

Do you have any suggestions for what might be causing this?

Docs

shalvah commented 4 months ago

I have no idea. Did you run with the verbose flag to trace the source?

jonkerw85 commented 4 months ago

Yes, I have also added the verbose flag. It did not really help. Thanks anyway, I will investigate it further myself.