forked from trent_larson/crowd-funder-for-time-pwa
chore: remove extra code & logging & error messages, fix quick-start documentation
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
* @module endorserServer
|
||||
*/
|
||||
|
||||
import { Axios, AxiosRequestConfig } from "axios";
|
||||
import { Axios, AxiosRequestConfig, AxiosResponse } from "axios";
|
||||
import { Buffer } from "buffer";
|
||||
import { sha256 } from "ethereum-cryptography/sha256";
|
||||
import { LRUCache } from "lru-cache";
|
||||
@@ -1131,7 +1131,7 @@ export async function createAndSubmitClaim(
|
||||
// Enhanced diagnostic logging for claim submission
|
||||
const requestId = `claim_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
||||
|
||||
logger.info("[Claim Submission] 🚀 Starting claim submission:", {
|
||||
logger.debug("[Claim Submission] 🚀 Starting claim submission:", {
|
||||
requestId,
|
||||
apiServer,
|
||||
requesterDid: issuerDid,
|
||||
@@ -1157,7 +1157,7 @@ export async function createAndSubmitClaim(
|
||||
},
|
||||
});
|
||||
|
||||
logger.info("[Claim Submission] ✅ Claim submitted successfully:", {
|
||||
logger.debug("[Claim Submission] ✅ Claim submitted successfully:", {
|
||||
requestId,
|
||||
status: response.status,
|
||||
handleId: response.data?.handleId,
|
||||
@@ -1754,7 +1754,7 @@ export async function fetchImageRateLimits(
|
||||
axios: Axios,
|
||||
issuerDid: string,
|
||||
imageServer?: string,
|
||||
) {
|
||||
): Promise<AxiosResponse | null> {
|
||||
const server = imageServer || DEFAULT_IMAGE_API_SERVER;
|
||||
const url = server + "/image-limits";
|
||||
const headers = await getHeaders(issuerDid);
|
||||
@@ -1788,7 +1788,7 @@ export async function fetchImageRateLimits(
|
||||
};
|
||||
};
|
||||
|
||||
logger.warn("[Image Server] Image rate limits check failed:", {
|
||||
logger.error("[Image Server] Image rate limits check failed:", {
|
||||
did: issuerDid,
|
||||
server: server,
|
||||
errorCode: axiosError.response?.data?.error?.code,
|
||||
@@ -1796,7 +1796,6 @@ export async function fetchImageRateLimits(
|
||||
httpStatus: axiosError.response?.status,
|
||||
timestamp: new Date().toISOString(),
|
||||
});
|
||||
|
||||
throw error;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user