question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error '{"success":false}' but no other information available

See original GitHub issue

Hi there,

First of all, this project is gorgeous ! Congrats for all your work, and for the effort of providing a hosted version.

But infortunately, I have a problem with the hosted version 😉

When I try to submit my comment, your server gives this response :

Status code : 400 Body : {"success":false}

staticman.yml :

comments:

  allowedFields: ["email", "name", "message"]

  branch: "comments"

  commitMessage: "Add comment to article"

  filename: "entry{@timestamp}"

  format: "yaml"

  generatedFields:
    date:
      type: date
      options:
        format: "timestamp-seconds"

  moderation: true

  name: "deudtens.com"

  path: "source/_comments/{options.slug}"

  requiredFields: ["email", "name", "message"]

  transforms:
    email: md5

Form HTML :

    <form method="POST" action="https://api.staticman.net/v2/entry/oservieres/blog-deudtens/comments/">
      <input name="options[redirect]" type="hidden" value="https://www.deudtens.com">
      <input name="options[slug]" type="hidden" value="{{ page.url }}">
      <label>Votre nom : <input name="fields[name]" type="text"></label>
      <label>Votre E-mail : <input name="fields[email]" type="email"></label>
      <label>Votre message : <textarea name="fields[message]"></textarea></label>

      <button type="submit">Envoyer</button>
    </form>

My blog repo : https://github.com/oservieres/blog-deudtens

I did not deploy the form in production, i’m submitting from my localhost.

I just don’t understand what’s happening, and I have no error message to guide me.

Do not hesitate to ask for more information if needed, Thank you.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jonathanyeongcommented, Jun 28, 2017

Firstly, thanks so much for building staticman. I’m actually getting the same issue on my site as well. It’s running HTTPS (not sure if that makes a difference). I’ve added staticmanpp as a collaborator to my repo.

Here’s the repo: https://github.com/jonathanyeong/personal-site.

staticman.yml:

comments:
  allowedFields: ["name", "email", "url", "message"]
  branch: "master"
  commitMessage: "Add Staticman data"
  filename: "entry{@timestamp}"
  format: "yaml"
  generatedFields:
    date:
      type: date
      options:
        format: "timestamp-seconds"
  moderation: true
  name: "jonathanyeong.com"
  path: "_data/comments/{options.slug}"
  requiredFields: ["name", "email", "message"]
  transforms:
    email: md5

my form (found in _layouts/post.html).

<form method="POST" action="https://api.staticman.net/v2/entry/jonathanyeong/personal-site/master/comments">
  <input name="options[redirect]" type="hidden" value="https://jonathanyeong.com">
  <!-- e.g. "2016-01-02-this-is-a-post" -->
  <input name="options[slug]" type="hidden" value="{{ page.slug }}">
  <label><input name="fields[name]" type="text">Name</label>
  <label><input name="fields[email]" type="email">E-mail</label>
  <label><textarea name="fields[message]"></textarea>Message</label>

  <button type="submit">Go!</button>
</form>

I am also submitting this form on localhost.

I doubt this makes a difference, but here’s what I’ve tried doing:

  • Restarting the jekyll server to make sure it picks up the staticman.yml file.
  • Changing the action link to: https://api.staticman.net/v2/entry/jonathanyeong/personal-site/master

Any suggestions?

0reactions
jonathanyeongcommented, Jul 2, 2017

@eduardoboucas Apologies, I ended up removing staticman because it wasn’t working. I went through the setup steps again and I ended up getting it working.

I was still getting the {‘success’: false} issue when I was running this back on my local host. However, when I pushed my changes it all worked on localhost (https://github.com/jonathanyeong/personal-site/pull/25).

I’m not sure if this information will help at all. Thank you for building this app!

Read more comments on GitHub >

github_iconTop Results From Across the Web

“success”:false,”data”:{“message”:”Wrong Request.”,”errorCode”
I've investigated this issue, and, this error code comes only when there is no JWT in request,cookie,session or header. Please go to plugin...
Read more >
Getting '{success: false, errorMessage: "Error: Invalid request ...
We have a Visualforce console component. At some point, we want to get info about all the open Console tabs. So we call...
Read more >
Understanding Success Criterion 3.3.1: Error Identification | WAI
The intent of this Success Criterion is to ensure that users are aware that an error has occurred and can determine what is...
Read more >
MSB4181: The 'task' task returned false but did not log an error
In this article. This error occurs when a task returned false to signal that it didn't complete successfully, but didn't log an error....
Read more >
How do you know what's gone wrong when your API request ...
Many APIs will give you more details in the response body, but sadly each with ... details for any error automatically, your client...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found