azagniotov/stubby4j

getting 500 error with basic setup

Closed this issue · 7 comments

Hello, stubby4j looks like exactly what I wanted ; however I am getting this {"code":"500","message"="Problem handling request in Admin handler: java.lang.NumberFormatException: For input string: "hello-world""}

when I tried --
the yaml :

  • request:
    method: GET
    url: /hello-world

    response:
    status: 200
    headers:
    content-type: application/json
    body: Hello World!

On the console log :[18:03:20] -> GET [/hello-world]
[18:03:20] <- 500 [/hello-world] Server Error . Could you please give me a quick direction ! thanks pronab

I need to see your YAML exactly as you formatted it...
Judging by what you have here, your YAML is not formatted correctly.

Make sure that you have something like that:

-  request:
      url: /hello-world
      method: GET

   response:
      status: 200
      headers:
         content-type: application/json
      body: Hello

I do not see any attachment here. I am not sure if whatever you attach via email will appear in Github

hello.txt
I renamed the file to txt extension as it is not able to take a yaml file attachment. Thanks Pronab

Hello. I am not sure what's going on at your end, but I start the stubby with the following command:
java -jar stubby4j-5.0.2-SNAPSHOT.jar --data test.yaml and can successfully load http://localhost:8882/hello-world in the browser in order to get Hello

My YAML looks as per what you posted before:

-  request:
      url: /hello-world
      method: GET

   response:
      status: 200
      headers:
         content-type: application/json
      body: Hello

Are you on Linux, Windows or Mac?

Also, I am going on vacation, so I might be slow to reply.

Closing this for now as there is no activity