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

vintasoftware / nextjs-fastapi-template / 12467469601

23 Dec 2024 01:18PM UTC coverage: 97.313%. Remained the same
12467469601

Pull #49

github

andersonresende
Merge branch 'main' into ft/deploy-content-length
Pull Request #49: Ft/deploy content length

83 of 98 branches covered (84.69%)

Branch coverage included in aggregate %.

1873 of 1912 relevant lines covered (97.96%)

6.9 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,
4✔
11
): string {
4✔
12
  let errorMessage = "An unknown error occurred";
4✔
13

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

4✔
22
  return errorMessage;
4✔
23
}
4✔
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