Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some 500 server error #102

Open
painsAgains opened this issue May 9, 2023 · 0 comments
Open

Some 500 server error #102

painsAgains opened this issue May 9, 2023 · 0 comments

Comments

@painsAgains
Copy link

I got some 500 server error when I test API.Here are some examples and my analysis of the causes of the errors.

1.Parameter type does not match

500 error is triggered when I pass in a parameter that does not match the API format document.After analysis, I think it's a problem with the email, phone and passwrod parameters

curl \
  --request POST \
  --url 'http://localhost:8080/api/v3/user\
  --header 'Content-Type: application/json' \
  --data '{"email":true}' \
  --location \
  --max-redirs 32
curl \
  --request POST \
  --url 'http://localhost:8080/api/v3/user\
  --header 'Content-Type: application/json' \
  --data '{"passwrod":true}' \
  --location \
  --max-redirs 32
curl \
  --request POST \
  --url 'http://localhost:8080/api/v3/user\
  --header 'Content-Type: application/json' \
  --data '{"phone":true}' \
  --location \
  --max-redirs 32

Update unexist pet_id

This issue is triggered when a non-existent pet_id is updated using uploadImage

curl \
  --request POST \
  --url 'http://localhost:8080/api/v3/pet/1232/uploadImage\
  --header 'Content-Type: application/json' \
  --location \
  --max-redirs 32

Get , Update or Delete unexist username

This issue is triggered when a non-existent username is updated

curl \
  --request POST \
  --url 'http://localhost:8080/api/v3/user/xxxx\
  --header 'Content-Type: application/json' \
  --location \
  --max-redirs 32
curl \
  --request GET \
  --url 'http://localhost:8080/api/v3/user/xxxx\
  --header 'Content-Type: application/json' \
  --location \
  --max-redirs 32
curl \
  --request Delete \
  --url 'http://localhost:8080/api/v3/user/xxxx\
  --header 'Content-Type: application/json' \
  --location \
  --max-redirs 32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant