[gelbooru] update 'api-key' & 'user-id' docs to match 'gelbooru_v02'

This commit is contained in:
Mike Fährmann
2025-08-22 17:06:19 +02:00
parent 4303b3ba9d
commit 0837bc2b70
2 changed files with 5 additions and 5 deletions

View File

@@ -2965,8 +2965,9 @@ Type
Default Default
``null`` ``null``
Description Description
Values from the API Access Credentials section found at the bottom of your Values from the `API Access Credentials` section
`Account Options <https://gelbooru.com/index.php?page=account&s=options>`__ found at the bottom of your account's
`Options <https://gelbooru.com/index.php?page=account&s=options>`__
page. page.

View File

@@ -35,9 +35,8 @@ class GelbooruBase():
data = self.request_json(url, params=params) data = self.request_json(url, params=params)
except exception.HttpError as exc: except exception.HttpError as exc:
if exc.status == 401: if exc.status == 401:
raise exception.AuthorizationError( raise exception.AuthRequired(
f"'api-key' and 'user-id' required " "'api-key' & 'user-id'", "the API")
f"({exc.status}: {exc.response.reason})")
raise raise
if not key: if not key: