• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vintasoftware / nextjs-fastapi-template / 12549334432

30 Dec 2024 04:41PM UTC coverage: 98.366%. First build
12549334432

Pull #57

github

web-flow
Merge d0be0ee65 into 717e0ecab
Pull Request #57: Added CORS_ORIGINS

89 of 96 branches covered (92.71%)

Branch coverage included in aggregate %.

1476 of 1495 relevant lines covered (98.73%)

8.4 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

82.76
/nextjs-frontend/lib/utils.ts
1
import { AuthJwtLoginError, RegisterRegisterError } from "@/app/clientService";
2✔
2
import { clsx, type ClassValue } from "clsx";
2✔
3
import { twMerge } from "tailwind-merge";
2✔
4

2✔
5
export function cn(...inputs: ClassValue[]) {
2✔
6
  return twMerge(clsx(inputs));
634✔
7
}
634✔
8

2✔
9
export function getErrorMessage(
2✔
10
  error: RegisterRegisterError | AuthJwtLoginError,
6✔
11
): string {
6✔
12
  let errorMessage = "An unknown error occurred";
6✔
13

6✔
14
  if (typeof error.detail === "string") {
6✔
15
    // If detail is a string, use it directly
6✔
16
    errorMessage = error.detail;
6✔
17
  } else if (typeof error.detail === "object" && "reason" in error.detail) {
6!
18
    // If detail is an object with a 'reason' key, use that
×
19
    errorMessage = error.detail["reason"];
×
20
  }
×
21

6✔
22
  return errorMessage;
6✔
23
}
6✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc