LoginSignup
0
0

More than 1 year has passed since last update.

【Rails】device使用してURLにアクセス時に、422 Unprocessable Entityと気の対処法

Last updated at Posted at 2021-06-19

症状

Advanced REST clientを使用して、URLにPOSTでAPIを叩くと、以下のエラーが発生してしましました。

error
422 Unprocessable Entity

422 Unprocessable Entityは、サーバーが要求本文のコンテンツ型を理解でき、要求本文の構文が正しいものの、中に含まれている指示が処理できなかったことを表します(引用)

つまり、postしたbodyの記述が間違っているようです

post
{
  email:"nekonekonekko",
  password:"123456"
}

解決方法

jspmの左側の文字を""で囲むことで解決しました。

post
{
  "email":"nekonekonekko",
  "password":"123456"
}

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0