mirror of
https://github.com/withastro/astro.git
synced 2025-01-20 22:12:38 -05:00
[ci] format
This commit is contained in:
parent
eb1d9a447b
commit
c135cd546d
2 changed files with 6 additions and 3 deletions
|
@ -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`;
|
||||
|
|
|
@ -115,7 +115,7 @@ function createRemoteDbServer() {
|
|||
error: {
|
||||
code: e instanceof LibsqlError ? e.code : 'SQLITE_QUERY_FAILED',
|
||||
details: e.message,
|
||||
}
|
||||
},
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue