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.

API.del method giving a 404 error

See original GitHub issue

So I’m using this code which is provided in amplify documentation and the path is certainly correct but I always get 404 response. Why is that?

      let path = '/factories/' + id ; //replace this with the path you have configured on your API

      console.log('we want to delete');
      console.log(path);

      API.del(apiName, path, myInit).then(response => {
        // Add your code here
        console.log('deleted');
      }).catch(error => {
        console.log(error.response);
      });
    },

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
manueliglesiascommented, Feb 1, 2019

Hi @ZalgirisKaunas

Can you try with:

let path = '/factories/object/' + id ;
0reactions
github-actions[bot]commented, Sep 4, 2021

This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resolve the "404 error" that occurs when delete API is ...
This article explains the topic, How to resolve the "404 error" that occurs when delete API is called in WebAPI application?
Read more >
DELETE/PUT verbs result in 404 Not Found in WebAPI, only ...
It says to double click on the handler, click "Request Restrictions", and "Allow PUT and DELETE verbs". I've done this, and I still...
Read more >
Testing api - DELETE request gives 404 response - Laracasts
I am trying to test one of my api endpoints which is working in the browser but I can't get the test to...
Read more >
Getting 404 for PUT and DELETE request on web.api
When I create new project(ASP.NET MVC 4 Web application -> WEB API), and I try to access the values controller via fiddler the...
Read more >
DELETE method with parameter - 404 Not found [SOLVED]
This is my code: $app->delete('/usuario/[{correo}]', function ($request, $response, $args) { $sth = $this->db->prepare("DELETE FROM usuarios WHERE email=: ...
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