Skip to content

Enhanced behaviour on when a resource already exist

Latest
Compare
Choose a tag to compare
@slakbal slakbal released this 26 Mar 16:09
  • Some Basic clean-up of unused code.

  • When a resource already exists and a duplicate error is thrown by the API it also returns the resource. Instead of throwing an error, the package also returns the resource back. This is then behaving like a findOrCreate.

elseif ($response->code == 409) { //If the user is already registered, return the body
            return $response->body;
        }
  • Added more logging info for better transparency if the call actually went out to the Goto API.