Skip to content

Commit

Permalink
fix: Carriage return issue
Browse files Browse the repository at this point in the history
  • Loading branch information
data-miner00 committed Jan 3, 2024
1 parent bd42109 commit 11887ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Linker.WebApi/Controllers/TagController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public async Task<IActionResult> CreateAsync([FromBody] CreateTagRequest request
await this.repository.AddAsync(request.TagName).ConfigureAwait(false);
return this.NoContent();
}
catch (SQLiteException ex) when (ex.Message.Equals("constraint failed\r\nUNIQUE constraint failed: Tags.Name"))
catch (SQLiteException ex) when (ex.Message.Contains("UNIQUE constraint failed: Tags.Name"))
{
return this.BadRequest("The tag with the same name already exists.");
}
Expand Down

0 comments on commit 11887ec

Please sign in to comment.