0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00

[ci] format

This commit is contained in:
Ben Holmes 2024-05-13 16:21:32 +00:00 committed by astrobot-houston
parent eb1d9a447b
commit c135cd546d
2 changed files with 6 additions and 3 deletions

View file

@ -157,7 +157,9 @@ const KNOWN_ERROR_CODES = {
};
const getUnexpectedResponseMessage = async (response: Response) =>
`Unexpected response from remote database:\n(Status ${response.status}) ${await response.clone().text()}`;
`Unexpected response from remote database:\n(Status ${response.status}) ${await response
.clone()
.text()}`;
async function parseRemoteError(response: Response): Promise<DetailedLibsqlError> {
let error;
@ -170,7 +172,8 @@ async function parseRemoteError(response: Response): Promise<DetailedLibsqlError
});
}
// Strip LibSQL error prefixes
let baseDetails = error.details?.replace(/.*SQLite error: /, '') ?? 'Error querying remote database.';
let baseDetails =
error.details?.replace(/.*SQLite error: /, '') ?? 'Error querying remote database.';
// Remove duplicated "code" in details
const details = baseDetails.slice(baseDetails.indexOf(':') + 1).trim();
let hint = `See the Astro DB guide for query and push instructions: https://docs.astro.build/en/guides/astro-db/#query-your-database`;

View file

@ -115,7 +115,7 @@ function createRemoteDbServer() {
error: {
code: e instanceof LibsqlError ? e.code : 'SQLITE_QUERY_FAILED',
details: e.message,
}
},
})
);
}