memory.js fix
This commit is contained in:
@@ -7,7 +7,7 @@ const BASE_URL = getEnv('MEMORY_SERVICE_URL', 'http://localhost:3002');
|
|||||||
async function getSessionByExternalId(externalId) {
|
async function getSessionByExternalId(externalId) {
|
||||||
const res = await fetch(`${BASE_URL}/sessions/by-external/${externalId}`);
|
const res = await fetch(`${BASE_URL}/sessions/by-external/${externalId}`);
|
||||||
|
|
||||||
if (!res.status === 404) return null; // Not found or bad request
|
if (res.status === 404) return null; // Not found or bad request
|
||||||
if (!res.ok) throw new Error(`Memory service error: ${res.status} ${res.statusText}`); // Other errors
|
if (!res.ok) throw new Error(`Memory service error: ${res.status} ${res.statusText}`); // Other errors
|
||||||
|
|
||||||
return res.json();
|
return res.json();
|
||||||
|
|||||||
Reference in New Issue
Block a user