MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / onResponse

Function onResponse

packages/backend/src/bitbucket.ts:52–59  ·  view source on GitHub ↗
({ response })

Source from the content-addressed store, hash-verified

50 */
51export const throwOnHttpError: Middleware = {
52 async onResponse({ response }) {
53 if (!response.ok) {
54 throw Object.assign(
55 new Error(`Bitbucket API ${response.status}: ${response.statusText}`),
56 { status: response.status },
57 );
58 }
59 },
60};
61
62type CloudPaginatedResponse<T> = {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected