LoginSignup
0
0

More than 1 year has passed since last update.

Rails: Measures when VCR says that the request content is not enough

Last updated at Posted at 2019-04-16
 An HTTP request has been made that VCR does not know how to handle: GET http://example.com 

When I get this error. If you open the YAML file generated by VCR and look at it, the content of the request should be insufficient.

Originally

 - request: method: get uri: http://example.com 

There should be a line called

For the content of the request you are about to send. This error occurs when the content of the cache file is insufficient.

In this case as a solution. You should delete the cache file once and create a new one.

Why did you come to this case? The application uses the cache function, and a VCR cache file is generated with some requests missing.

Because "application-side caching" is enabled or disabled depending on the situation. "VCR file missing request content" and "operation when trying to request everything" are different, and an error occurred accidentally.

VCR files should be created with the caching feature disabled. Because an error occurs only when the contents of the cache file are "insufficient". There is no problem if there are many. (Probably)

Original by

Rails : VCRでリクエスト内容が足りないと言われる時の対策

About

About this translattion

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

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