# Debug request under SBT test

**URL:** <https://community.gatling.io/t/debug-request-under-sbt-test/8485>\
**Category:** Gatling (Open-Source)\
**Created:** [November 26, 2023, 5:50pm UTC](https://community.gatling.io/t/debug-request-under-sbt-test/8485 "2023-11-26T17:50:17Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [November 26, 2023, 7:53pm UTC](https://community.gatling.io/t/debug-request-under-sbt-test/8485/3 "2023-11-26T19:53:28Z")

</div>

Now for the possible reasons of this timeout:

- incorrect baseUrl
- forcing `content-length` header to an incorrect value
- weird server that doesn’t like this `user-agent` header value
- buggy server that doesn’t properly fail on a bad request, eg missing some request header, or:

```scala
s"""{
     | "refresh_token": "${Configuration.apiKey}"
     |}
     """.stripMargin

```

Do you realize that you don’t have a pipe character on the last line? As a result, the actually String will end with a line feed and several white spaces. Maybe that’s what causing your application to choke. If so, I would also argue that your application should reply with `400: Bad Request` instead of timing out.

---

_[View the full topic](https://community.gatling.io/t/debug-request-under-sbt-test/8485)._
