Skip to content

Commit

Permalink
fine tuning error catching
Browse files Browse the repository at this point in the history
  • Loading branch information
Trismegiste committed Mar 25, 2024
1 parent 7509d82 commit 36fd437
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Service/StableDiffusion/InvokeAiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ protected function searchPromptFor(string $name): string
return '';
}

public function searchLastImage(int $limit = 24): iterable
public function searchLastImage(int $limit = 27): iterable
{
$response = $this->client->request('GET', $this->baseUrl . "api/v1/images/?is_intermediate=false&categories=general&board_id=none&limit=$limit", ['timeout' => self::TIMEOUT]);
if ($response->getStatusCode() !== 200) {
Expand Down
6 changes: 3 additions & 3 deletions templates/invokeai/vertex_search.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
try {
const resp = await fetch(url)
if (!resp.ok) {
throw new Error(this.source, {cause: await resp.json()})
throw new Error('Last InvokeAI pictures unreachable')
}
this.gallery = await resp.json()
} catch (error) {
console.error(error.cause)
} catch (e) {
console.error(e.message)
}
},
Expand Down

0 comments on commit 36fd437

Please sign in to comment.