Mongodb Error codes and corresponding http status code

后端 未结 0 1242
生来不讨喜
生来不讨喜 2021-01-12 08:40

So, if a new user tries to sign up with an user account that already exists, MongoDb responds with a 11000 error code

In Express, that can be handled like this:

<
相关标签:
回答
  • 消灭零回复
提交回复
热议问题