diff --git a/api/haxelib.ts b/api/haxelib.ts index 3370691..bc65ed2 100644 --- a/api/haxelib.ts +++ b/api/haxelib.ts @@ -12,7 +12,7 @@ class HaxelibClient extends RpcClient { async info(project) { try { return await this.call('api.infos', [project]) - } catch (err) { + } catch (err: any) { if (err.message.startsWith('No such Project')) { throw new BadgenError({ status: 404 }) } diff --git a/index.ts b/index.ts index 332c273..fbb78b8 100644 --- a/index.ts +++ b/index.ts @@ -65,7 +65,7 @@ const server = http.createServer(async (req, res) => { const { default: handler } = await import(handlerPath) return handler(req, res, handlerName) } - } catch (error) { + } catch (error: any) { console.error(error) return sendError(res, error) } diff --git a/libs/create-badgen-handler.ts b/libs/create-badgen-handler.ts index f6c36a8..efa4d76 100644 --- a/libs/create-badgen-handler.ts +++ b/libs/create-badgen-handler.ts @@ -115,7 +115,7 @@ export function createBadgenHandler (conf: BadgenServeConfig): BadgenHandler { } return serveBadge(req, res, { params, query: query as any }) - } catch (error) { + } catch (error: any) { measurementLogError('error', error.code || error?.response?.statusCode , req.url || '/') if (error instanceof BadgenError) {