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

vintasoftware / nextjs-fastapi-template / 13813915942

12 Mar 2025 02:28PM UTC coverage: 98.372%. Remained the same
13813915942

push

github

web-flow
Merge pull request #80 from vintasoftware/ft/changelog

Ft/changelog

91 of 98 branches covered (92.86%)

Branch coverage included in aggregate %.

1480 of 1499 relevant lines covered (98.73%)

8.38 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