Merge branch 'master' into fix-deep-link

This commit is contained in:
2025-08-19 19:53:38 -06:00
24 changed files with 2293 additions and 495 deletions

View File

@@ -124,17 +124,11 @@ export class ProfileService {
async deleteProfile(activeDid: string): Promise<boolean> {
try {
const headers = await getHeaders(activeDid);
logger.debug("Attempting to delete profile for DID:", activeDid);
logger.debug("Using partner API server:", this.partnerApiServer);
logger.debug("Request headers:", headers);
const url = `${this.partnerApiServer}/api/partner/userProfile`;
logger.debug("DELETE request URL:", url);
const response = await this.axios.delete(url, { headers });
if (response.status === 200 || response.status === 204) {
logger.debug("Profile deleted successfully");
if (response.status === 204 || response.status === 200) {
logger.info("Profile deleted successfully");
return true;
} else {
logger.error("Unexpected response status when deleting profile:", {
@@ -248,7 +242,7 @@ export class ProfileService {
}
/**
* Type guard for API errors
* Type guard for API errors with proper typing
*/
private isApiError(error: unknown): error is {
response?: {
@@ -276,6 +270,17 @@ export class ProfileService {
private isAxiosError(error: unknown): error is AxiosError {
return error instanceof AxiosError;
}
/**
* Extract error URL safely from error object
*/
private getErrorUrl(error: unknown): string | undefined {
if (this.isApiError(error) && error.config) {
const config = error.config as { url?: string };
return config.url;
}
return undefined;
}
}
/**