codestates / codestates/Bobpago

[๐ŸšจErr Handling] Code : 'ER_DUB_ENTRY' (๋ ˆ์‹œํ”ผ ์ข‹์•„์š” ๋ฒ„ํŠผ ๋ˆŒ๋ €์„๋•Œ ์ถ”๊ฐ€๊ฐ€ ์•ˆ๋˜๋Š” ์—๋Ÿฌ )

Open
#142 0 comments 0 reactions 1 assignee Claimed by @tjdgns5272 View on GitHub
bug complete error handling
Dominant language
TypeScript
Stars
5
Forks
3
PR merge metrics
No merged PRs in 30d

Description

> ํ•ด๊ฒฐ๋œ ์—๋Ÿฌ๋ผ๋ฉด ๋ผ๋ฒจ์— 'Complete' ๋ฅผ ๋‹ฌ์•„์ฃผ์„ธ์š”.
> ๋ฏธํ•ด๊ฒฐ๋œ ์—๋Ÿฌ๋ผ๋ฉด ๋ผ๋ฒจ์„ 'In progress' ๋กœ ๋ณ€๊ฒฝํ•ด์ฃผ์„ธ์š”.

### ์–ด๋–ค ์—๋Ÿฌ์ธ๊ฐ€์š”?

> ๋ ˆ์‹œํ”ผ ์ข‹์•„์š”๋ฅผ ๋ˆŒ๋ €๋”๋‹ˆ response๋กœ server์—์„œ ์ค‘๋ณต์š”์ฒญ์„ ๋ฐฉ์ง€ ํ•˜๊ธฐ์œ„ํ•ด ์ž‘์„ฑํ•ด๋‘” '์ด๋ฏธ ์ข‹์•„์š”๋ฅผ ๋ˆŒ๋ €๋‹ค'๊ฐ€ ๋œจ๊ณ 
๋‹ค์‹œ ๋ˆ„๋ฅด๋ฉด ์ด๋ฏธ ์‚ญ์ œ๋ฌ๋‹ค๊ณ  ์‘๋‹ต์ด ์™”๋‹ค.

### ์—๋Ÿฌ ๋ฉ”์‹œ์ง€
![image](https://user-images.githubusercontent.com/69573484/135811469-306d2f00-92cd-4bf7-bf8a-5efdf7b8de36.png)

### ์—๋Ÿฌ ํ•ธ๋“ค๋ง ๋ฐฉ๋ฒ•

> ์ฒ˜์Œ์—” ํด๋ผ์ด์–ธํŠธ ์ฝ”๋“œ์ƒ์˜ ๋กœ์ง์ด ์ž˜๋ชป ๋œ์ค„ ์•Œ๊ณ  ์‘๋‹ต ์š”์ฒญ api ๋กœ์ง์„ ๋“ค์—ฌ๋‹ค ๋ณด์•˜์œผ๋‚˜ ์›์ธ์„ ์ฐพ์ง€ ๋ชปํ•˜์˜€๋‹ค.
๊ทธ๋Ÿฌ๋‹ค๊ฐ€ ์ฝ˜์†”์ฐฝ์— Code : 'ER_DUB_ENTRY' ์—๋Ÿฌ ๋ฉ”์„ธ์ง€ ๋ฅผ ๋’ค๋Šฆ๊ฒŒ ๋ฐœ๊ฒฌํ•˜๊ณ  ๊ตฌ๊ธ€๋ง์„ ํ•ด๋ณด์•˜๋‹ค.
ํ…Œ์ด๋ธ”์— ์ค‘๋ณต๋œ id๊ฐ€ ๋“ค์–ด๊ฐ”๋‹ค๊ณ  ํ•ด์„œ ๋ฌด์ฒ™ ๋‹นํ™ฉ์Šค๋Ÿฌ์› ์ง€๋งŒ entities > recipe_reaction.entity.ts ํŒŒ์ผ๋กœ
๋“ค์–ด๊ฐ€์„œ ๊ด€๊ณ„ ์„ค์ •์„ ํ™•์ธํ•ด๋ณด๋‹ˆ user ํ…Œ์ด๋ธ”๊ณผ 1:1 ๊ด€๊ณ„๋กœ ์„ค์ •์ด ๋˜์–ด์žˆ์—ˆ๋‹ค. comment_reaction๋„ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ user๋กœ 1:1 ๊ด€๊ณ„๋กœ ์„ค์ •๋˜์žˆ๋Š”๊ฑธ ๋ฐœ๊ฒฌํ–ˆ๋‹ค..! ํ•œ๋ช…์˜ ์œ ์ €๋Š” ์—ฌ๋Ÿฌ ์ฝ”๋ฉ˜ํŠธ ๋ฐ ๋ ˆ์‹œํ”ผ์— ์—ฌ๋Ÿฌ๊ฐœ์˜ ๋ฆฌ์•ก์…˜์„ ํ• ์ˆ˜์žˆ๊ธฐ ๋•Œ๋ฌธ์— 1:N ๊ด€๊ณ„๋กœ ๋‹ค์‹œ ์žฌ ์„ค์ • ํ•ด์ฃผ์—ˆ๋‹ค.

![image](https://user-images.githubusercontent.com/69573484/135849169-90a33ab8-3893-47e9-97d6-5cec27af0fad.png)
![image](https://user-images.githubusercontent.com/69573484/135849213-176c52c3-8b28-4bfe-895c-ea7cb0aeb592.png)
![image](https://user-images.githubusercontent.com/69573484/135849241-8a628a2c-4f47-450a-8e2c-1b229eb1301a.png)

[https://github.com/codestates/Bobpago/pull/140/files](https://github.com/codestates/Bobpago/pull/140/files)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.