Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/api/remotes/[encodedRemoteConfig]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export async function GET(_req: NextRequest, { params }: { params: Promise<Remot
} else if (error.name === ErrorName.TIMEOUT) {
return makeAPIErrorResponse(408, "The operation timed out.")
} else if (error.name === ErrorName.NOT_JSON_OR_YAML) {
return makeAPIErrorResponse(400, "Url does not point to a JSON or YAML file.")
return makeAPIErrorResponse(400, error.message)
} else if (error.name === ErrorName.URL_MAY_NOT_INCLUDE_BASIC_AITH) {
return makeAPIErrorResponse(400, "Url may not include basic auth.")
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/common/utils/fileUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function checkIfJsonOrYaml(fileText: string) {
try {
parseYaml(fileText) // will also parse JSON as it is a subset of YAML
} catch {
const error = new Error("File is not JSON or YAML")
const error = new Error("File is not JSON or YAML. Content: " + fileText.slice(0, 1000));
error.name = ErrorName.NOT_JSON_OR_YAML
throw error
}
Expand Down
2 changes: 1 addition & 1 deletion src/features/projects/data/GitHubProjectDataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export default class GitHubProjectDataSource implements IProjectDataSource {
password: this.encryptionService.decrypt(projectConfigRemoteSpec.auth.encryptedPassword)
}
} catch (error) {
console.error(`Failed to decrypt remote specification auth for ${projectConfigRemoteSpec.url}. Perhaps a different public key was used?:`, error);
console.info(`Failed to decrypt remote specification auth for ${projectConfigRemoteSpec.name} (${projectConfigRemoteSpec.url}). Perhaps a different public key was used?:`, error);
return undefined
}
}
Expand Down