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.

Passing an out of range value to a unsigned integer throws a vague error

See original GitHub issue

https://github.com/prisma/introspection-engine-output/blob/17c81171e67e1e45312668a9b38b977dc061996b/test-utils/results/mysql_public_test_utils_drupal_stderr.log

2020-03-11T13:55:21.617Z prisma-client prisma.lAfOL_block_content_field_data.create({
  data: {
    changed: -1512,
    default_langcode: 440,
    id: 4,
    info: 'bawha',
    langcode: '57e13d34-ca08-5720-b994-69fb4d3a0f81',
    reusable: 990,
    revision_id: -915,
    revision_translation_affected: 159,
    status: 1315,
    type: 'uhred'
  }
})
2020-03-11T13:55:21.617Z prisma-client Generated request:
2020-03-11T13:55:21.617Z prisma-client mutation {
  createOnelAfOL_block_content_field_data(data: {
    changed: -1512
    default_langcode: 440
    id: 4
    info: "bawha"
    langcode: "57e13d34-ca08-5720-b994-69fb4d3a0f81"
    reusable: 990
    revision_id: -915
    revision_translation_affected: 159
    status: 1315
    type: "uhred"
  }) {
    changed
    default_langcode
    id
    info
    langcode
    reusable
    revision_id
    revision_translation_affected
    status
    type
  }
}

...

Invalid response data: the query result was required, but an empty Object((Weak)) was returned instead.
    at PrismaClientFetcher.request (/home/runner/work/introspection-engine-output/introspection-engine-output/clients/mysql_public_test_utils/drupal/runtime/index.js:1:47203)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
model lAfOL_block_content_field_data {
  changed                       Int?
  default_langcode              Int
  id                            Int
  info                          String?
  langcode                      String
  reusable                      Int?
  revision_id                   Int
  revision_translation_affected Int?
  status                        Int
  type                          String

  @@id([id, langcode])
  @@index([id, default_langcode, langcode], name: "block_content__id__default_langcode__langcode")
  @@index([revision_id], name: "block_content__revision_id")
  @@index([status, type, id], name: "block_content__status_type")
  @@index([type], name: "block_content_field__type__target_id")
}
CREATE TABLE `lAfOL_block_content_field_data` (
  `id` int(10) unsigned NOT NULL,
  `revision_id` int(10) unsigned NOT NULL,
  `type` varchar(32) CHARACTER SET ascii NOT NULL COMMENT 'The ID of the target entity.',
  `langcode` varchar(12) CHARACTER SET ascii NOT NULL,
  `status` tinyint(4) NOT NULL,
  `info` varchar(255) DEFAULT NULL,
  `changed` int(11) DEFAULT NULL,
  `reusable` tinyint(4) DEFAULT NULL,
  `default_langcode` tinyint(4) NOT NULL,
  `revision_translation_affected` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`id`,`langcode`),
  KEY `block_content__id__default_langcode__langcode` (`id`,`default_langcode`,`langcode`),
  KEY `block_content__revision_id` (`revision_id`),
  KEY `block_content_field__type__target_id` (`type`),
  KEY `block_content__status_type` (`status`,`type`,`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='The data table for block_content entities.';

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

unsigned long int accepts out of range values - Stack Overflow
1 Answer 1 ... It looks like you're trying to ensure that the user doesn't type too big a value for your seconds...
Read more >
Should you throw an exception if a method's input values are ...
Yes, I believe you should throw an exception, to help your fellow programmers notice the error at compile-time, by also adding throws ...
Read more >
unsigned vs signed - Is Bjarne Mistaken? - Google Groups
>positive values are passed to it. It does just the opposite: it hides the fact that a negative number has been passed. So...
Read more >
C++ unsigned int | Optimizing and Manipulating with Bits
If the user tries to store a value more than that of the defined range, then it experiences some errors as unsigned integers...
Read more >
C++ Core Guidelines - GitHub Pages
The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++.
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