ReferenceConstraintException caught silently with no logging

Open
#79 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
csharp
Domain
backend

Research direction

Start by reading the catch blocks in Appy/Services/ClientService.cs around line 105 and the similar pattern in Appy/Services/ServiceService.cs. Confirm how ReferenceConstraintException is converted to BadRequestException("Archive"). Done means both paths log the exception at warning level with the entity type and ID before conversion, while preserving the existing client response.

Written by the indexing model from the issue text.

Description

bug llm generated medium priority

Description

ReferenceConstraintException is caught and silently converted to a BadRequestException("Archive") with no log entry. The original constraint violation context is discarded.

Location

  • Appy/Services/ClientService.cs (line ~105)
  • Appy/Services/ServiceService.cs (similar pattern)

Risk

Constraint violations are invisible in logs, making it impossible to diagnose why archive/delete operations fail in production. Unrelated constraint errors (schema bugs, migration issues) get silently swallowed too.

Suggested Fix

Log the exception at warning level before converting it, including the entity type and ID. Consider providing a more specific error message to the client.

Dominant language
TypeScript
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Worly/Appy

All issues in Worly/Appy

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.