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.

warn.js:48 WARNING: You pushed a record of type 'clip' with a
relationship 'comments' configured as 'async: false'. You've included 
a link but no primary data, this may be an error in your payload.

With sync relationships the presence of a link throws an error. Let’s filter these warnings out.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:5
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
YoranBrondsemacommented, Apr 4, 2018

I don’t use ember-data-storefront but I’m using similar patterns, i.e. async relationships everywhere but with links in the payload too. Therefore I am seeing a lot of these warnings. I filtered out these warnings by adding the following initializer to my app:

// app/initializers/warnings-to-ignore.js

import { registerWarnHandler } from '@ember/debug';

const IGNORED_WARNINGS = [
  'ds.store.push-link-for-sync-relationship'
];

export default {
  name: 'warnings-to-ignore',
  initialize() {
    registerWarnHandler(function(message, options, next) {
      if (!ignoreWarning(options)) {
        next(...arguments);
      }
    });
  }
};

function ignoreWarning(options) {
  return options && options.id && IGNORED_WARNINGS.includes(options.id);
}

This uses the API described in RFC 65.

I thought I’d share this snippet as it might help getting the functionality into the addon!

2reactions
samselikoffcommented, Feb 12, 2018

👍 on filter the warning

Read more comments on GitHub >

github_iconTop Results From Across the Web

Alert Payload - Prisma Cloud - Palo Alto Networks
A Prisma™ Cloud alert payload is a JSON data object that contains detailed information about an alert, such as the cloud account, resource, ......
Read more >
Webhook events and payloads - GitHub Docs
Webhook payloads contain the organization object when the webhook is configured for an organization or the event occurs from activity in a repository...
Read more >
Generating a remote notification - Apple Developer
Remote notifications convey important information to the user in the form of a JSON payload. The payload specifies the types of user interactions...
Read more >
Payload.ParametersWarning (api 1.13.0 API)
This enum represents the different types of warnings that the parameters of a payload can have. A payload can be usable, but may...
Read more >
Configuring custom payloads - IBM
Adding custom payload to your alert notifications enables you to use Instana alerts more efficiently:
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